]
Bela Ban updated JGRP-2163:
---------------------------
Fix Version/s: 3.6.14
Potential NPE in TP.handleProbe
-------------------------------
Key: JGRP-2163
URL:
https://issues.jboss.org/browse/JGRP-2163
Project: JGroups
Issue Type: Bug
Reporter: Zoltan Farkas
Assignee: Bela Ban
Priority: Minor
Fix For: 3.6.14
at:
https://github.com/belaban/JGroups/blob/3.6/src/org/jgroups/protocols/TP....
{code}
public Map<String, String> handleProbe(String... keys) {
Map<String,String> retval=new HashMap<>(keys != null? keys.length :
2);
for(String key: keys) {
{code}
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).