[SNMP4J] UsmUserEntry.java question

kenping kenping at os.org.cn
Wed Jan 12 18:28:05 CET 2005


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


More information about the SNMP4J mailing list