java.lang.NullPointerException: element cannot be mapped to a null key

错误原因:Stream的groupingBy 方法,key为null导致的

image

解决方法:加一个filter过滤null值

image

posted @ 2022-07-06 10:28  爱吃糖的橘猫  阅读(468)  评论(0编辑  收藏  举报