0%

问题场景

user LIst转成id->email的map,若email存在Null的话,则会报NPE。user定义如下

1
2
3
4
5
6
7
8
@Setter
@Getter
@ToString
class User {
private Integer id;

private String email;
}
Read more »