Set<String> set = map.keySet(); if(set != null && !set.isEmpty()) { for(String key : set) { if(map.get(key) == null) { map.put(key, ""); } } }
Map<K, V> 中k,v如果为null就转换
原文:https://www.cnblogs.com/smileblogs/p/10332279.html