[SNMP4J] Regression in snmp4j 1.9.1g (NullPointerException for async send)

Frank Fock fock at agentpp.com
Thu Jun 12 00:11:18 CEST 2008


Hi Christof,

This is now fixed with version 1.9.2 which
can be downloaded from snmp4j.org.

Best regards,
Frank

Christof Meerwald wrote:
> Hi,
> 
> there appears to be a pretty nasty regression in snmp4j 1.9.1g (might 
> have been introduced in 1.9.1f) where you get a NullPointerException in 
> Snmp$PendingRequest.pduHandleAssigned (Snmp.java, line 1428) when trying 
> to send an asynchronous request (essentially just using the code from 
> the Javadoc to send an asynchronous SNMPv1 request).
> 
> The problem appears to be that a call to createPendingTimer() (if timer 
> == null) has been added to the synchronous send method, but not to the 
> asynchronous send method in Snmp.java. Therefore, the timer variable 
> could still potentially be null in the pduHandleAssigned callback and 
> result in a NullPointerException.
> 
> So, I think, a call to createPendingTimer needs to be added to the 
> asynchronous send method as well (Snmp.java, line 850).
> 
> 
> Christof
> 

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com



More information about the SNMP4J mailing list