判断 对象是否为空
Optional.ofNullable(queueWhiteOne).isPresent())
//防止对象空指针异常
Optional.ofNullable(list).orElse(Lists.newArrayList());
public static void main(String[] args) {
List<String> list = null;
List<String> newList = Optional.ofNullable(list).orElse(Lists.newArrayList());
newList.forEach(x -> System.out.println(x));