]
Bela Ban commented on JGRP-1862:
--------------------------------
Released 3.5.0.CR2
NPE during FIND_MBRS when using shared transport
------------------------------------------------
Key: JGRP-1862
URL:
https://issues.jboss.org/browse/JGRP-1862
Project: JGroups
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.5
Reporter: Paul Ferraro
Assignee: Bela Ban
Priority: Blocker
Fix For: 3.5
The following code within org.jgroups.protocols.TP.sendToSingleMember(...) throws an NPE
if the transport is shared:
{code}
Responses responses=(Responses)up(new Event(Event.FIND_MBRS, Arrays.asList(dest)));
try {
for(PingData data : responses) {
if(data.getAddress() != null && data.getAddress().equals(dest)) {
if((physical_dest=data.getPhysicalAddr()) != null) {
sendUnicast(physical_dest, buf, offset, length);
return;
}
}
}
}
finally {
responses.done();
}
{code}
This is because up(Event) always returns null when using a shared transport.
The same issue affects org.jgroups.protocols.TP.fetchPhysicalAddrs(...):
{code}
if(!missing.isEmpty()) {
Responses rsps=(Responses)up(new Event(Event.FIND_MBRS, missing));
rsps.done();
}
{code}