Hi!
I found a problem in the OID class. The nextPeer() method runs into a
StackOverflowError. The method:
public final OID nextPeer() {
OID next = new OID(this);
if ((next.size() > 0) && (last() != MAX_SUBID_VALUE)) {
next.set(next.size()-1, last()+1);
}
else if (next.size() > 1) {
next.trim(1);
next = nextPeer();
}
return next;
}
The fix:
- next = nextPeer()
+ next = next.nextPeer();
Here's a test case:
@Test
public void testNextPeer() {
OID oid = new OID(new int[] { 1, 0xFFFFFFFF });
oid.nextPeer();
}
Best regards,
Steffen Brüntjen
_______________________________________________
SNMP4J mailing list
[email protected]
https://oosnmp.net/mailman/listinfo/snmp4j