SNMP4J fluent interface not working properly for all attributes

The new SNMP4J fluent interface is a great help in designing understandable and maintainable workflow. However, I noticed that in (at least) two aspects the assignment of variable values through the fluent interface is not working. These cases are:

  • TargetBuilder.v2c() (or similar version setting command):
    The root cause seems to be that the “TargetBuilder.build()” method does simply not consider the “snmpVersion” field when constructing the Target. Current workaround is “target.setVersion(SnmpConstants.version2c)” after constructing the target with “build()”.

  • PduBuilder.oids() (or similar oid/vb setting command):
    Same logic applies here, the “vbs” field is simply not considered in the “PduBuilder.build()” method. Workaround using the old syntax is possible of course.

Are these indeed bugs, or am I missing something here?
Thanks in advance!

Hi Sebastian,

Thanks for reporting it. Obviously, I did not use the fluent interface consequently enough in my tests :face_with_peeking_eye:
These two bugs have been fixed with SNMP4J 3.6.7 which is already available.

Best regards,
Frank