Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I saw an NPE in a ViewCreator thread and created this unit test to reproduce the problem:
public void testNullPublicKeysNotRetained() throws Exception { NetView view = new NetView(members.get(0), 2, new ArrayList<>(members)); setFailureDetectionPorts(view); NetView newView = new NetView(view, 3); for (InternalDistributedMember member: view.getMembers()) { view.setPublicKey(member, null); } newView.setPublicKeys(view); for (InternalDistributedMember member: view.getMembers()){ assertNull(newView.getPublicKey(member)); assertNull(view.getPublicKey(member)); } }
The problem seems to be that some Maps that NetView uses to hold these keys accept null values whlie others do not.