Compilation error

Hi Frank

Upgrading from snmp4j <2.8.6> to <3.5.1>

PDU.varbindings - was compiling fine in 2.8.6 version of SNMP4J and throws the below error when using maven dependency version 3.5.1

incompatible types: java.util.List<capture#1 of ? extends org.snmp4j.smi.VariableBinding> cannot be converted to java.util.ArrayList<org.snmp4j.smi.VariableBinding>

Tried to convert to vector, arraylist - in vain.

Please help at the earliest.

Hi,

That is intended, see also the CHANGE log:

[2018-09-17] Version 3.0.0:

  • Added [SFJ-114]:Implemented DTLS support according to RFC 6353 by DTLSTM.
  • Added [SFJ-175]: Support for Java 9 modules.
  • Improved [SFJ-88]: Replaced Vector return Value in PDU.getVariableBindings() with List and removed Vector from other inner usages, i.e. by listener lists.
1 Like