Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-2215

NPE in ViewCreator thread setting public keys into a NetView

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.1.0
    • membership
    • 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.

      Attachments

        Activity

          People

            bschuchardt Bruce J Schuchardt
            bschuchardt Bruce J Schuchardt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: