[SNMP4J] UsmUserEntry.java question

Frank Fock fock at agentpp.com
Wed Jan 12 19:39:54 CET 2005


Hi Kenping,

Yes, well observed, it's obviously a bug.
The correct line should read:

result = engineID.compareTo(other.engineID);

A patch release will be available for download
soon. Many thanks for reporting the bug!

Best regards,
Frank

kenping wrote:

>Hi,
>    Has there a bug in UsmUserEntry.java at line 135 ?:
>
>    if ((engineID != null) && (other.engineID != null)) {
>      engineID.compareTo(other.engineID);   <----- ???
>    }
>    else if ((engineID != null) && (other.engineID != null)) {
>      result = 1;
>    }
>
>    I changed it to follows:
>
>    if ((engineID != null) && (other.engineID != null)) {
>      result = engineID.compareTo(other.engineID);
>    }
>    else if ((engineID != null) && (other.engineID == null)) {
>      result = 1;
>    }
>    else if ((engineID == null) && (other.engineID != null)) {
>      result = -1;
>    }
>
>    Is it correct?
>
>thanks for all.
>yours kenping
>
>------------------------------------------------------------------------
>
>_______________________________________________
>SNMP4J mailing list
>SNMP4J at agentpp.org
>http://p15141779.pureserver.info/mailman/listinfo/snmp4j
>  
>





More information about the SNMP4J mailing list