解决方法 1、移除null元素 list.remove(null); //移除第一个null list.removeAll(Collections.singleton(null)); //移除所有的null元素 2、确保数据库操作可以确保查询出来无空值