java.io.NotSerializableException: java.util.HashMap$KeySet问题处理
在代码中使用keyset时出现:
?
java.io.NotSerializableException: java.util.HashMap$KeySet
异常。
?
代码是:
?
cbgCustomer.setValue(customerItemMap.keySet());
?
解决办法:
cbgCustomer.setValue(new HashSet<String>(customerItemMap.keySet()));
?
新new一个hashset就OK。
?
?
?
参考