Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2163

Potential NPE in TP.handleProbe

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 3.6.14
    • None
    • None

      at:
      https://github.com/belaban/JGroups/blob/3.6/src/org/jgroups/protocols/TP.java#L1398

          public Map<String, String> handleProbe(String... keys) {
              Map<String,String> retval=new HashMap<>(keys != null? keys.length : 2);
              for(String key: keys) {
      

      keys is checked for null and on the next line it is de-refferenced...

      this code fill fail with NPE if keys is null...

      This issue is discovered by findbugs NP_NULL_ON_SOME_PATH check. Highly recommend running findbugs + coverity (free for OS projects).

              rhn-engineering-bban Bela Ban
              zolyfarkas_jira Zoltan Farkas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: