Optional.ofNullable(user).ifPresent(u->
{ // TODO: do something }
);
收起
if(Objects.isNull(Object)){//todo为空执行}else{//todo不为空执行}
报告相同问题?