集合对象去重
List battleArrayPlayerList = playList.stream().collect(Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(BattleArrayPlayer::getPlayerId))),
ArrayList::new));
上面这行代码报空指针
求解答!