[SNMP4J] Possible (minor) bug found
inliner683 at gmx.de
inliner683 at gmx.de
Fri Jan 18 17:20:57 CET 2008
It seems to be a bug wrt. JDK logging in SNMP4j.
To reproduce it:
Startup the provided TestAgent with using
LogFactory.setLogFactory(new JavaLogFactory());
Then use a mib browser and do a MIB walk from OID .1. or try to look at the
SNMP4J-LOG-MIB tables.
Now a Nullpointer Exception will be thrown in
class Snmp4jLogMib and method createLoggerRow(int n, LogAdapter logger,int storageType)
which does
logger.getLogLevel().getLevel()
Here the loglevel returned is null which causes the nullpointer.
I looked at the JavalogAdapter, where the method fromJavaToSnmp4jLevel
is called.
Ther the check
if (level == null) {
return null;
}
could be the cause. None of the other logadapter return a null value here and
do not cause any problems.
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
More information about the SNMP4J
mailing list