Hi,
I’m seeing rare instances in timeouts in which the Snmp.send()
method returns null.
Looking at the code, I suspect it is because of the following block:
ResponseEvent<A> responseEvent = syncResponse.getResponse();
if (syncResponse.getResponse() == null) {
responseEvent =
new ResponseEvent<A>(Snmp.this, null, pdu, null, null);
}
return responseEvent;
Should the null check be performed on responseEvent
instead of syncResponse.getResponse()
, because the first call to syncResponse.getResponse()
could return null, but the second followup call in the null check may not be null, and thus responseEvent
is never assigned a non-null value before it returns?
Thanks,
Jeremy