[SNMP4J] Regression in snmp4j 1.9.1g (NullPointerException for async send)
Christof Meerwald
cmeerwald at emnico.com
Tue Jun 10 14:46:30 CEST 2008
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
--
Emnico Technologies Ltd - http://www.emnico.com
Dauntsey House, Stonehill Green, Westlea, Swindon SN5 7HB
Company No. 06390113
This message is confidential and may contain privileged information.
If you are not the addressee indicated in this message (or responsible
for delivery of the message to them), you may not copy or deliver this
message to anyone or take any action in reliance on it. If you have
received this e-mail in error, please delete it and notify the sender
as soon as possible. The Emnico group of companies do not accept any
liability for any harm that may be caused to the recipient's system or
data by this message. Please carry out virus and other such checks as
you consider appropriate.
More information about the SNMP4J
mailing list