jdk8处理Op的stream问题
val reprofile=userList.stream() .map(user->ThirdPartyApi.findByUsername(user.getUsername())) .flatMap(o->o.isPresent() ? Stream.of(o.get()) : Stream.empty()) .peek(user->log.debug("userProfile :{}",user)) .collect(toList()); log.debug("profile{}",reprofile);