[SNMP4J] Mistake at methode getTargetAddress(OctetString name) of SNMPTargetMIB

Frank Fock fock at agentpp.com
Fri May 19 19:48:26 CEST 2006


Hi Nídia,

Yes, of course, the "return" is missing!
Fortunately, that method is not used within the
framework - that's probably why I did not find
the bug myself ;-)

Best regards,
Frank

Nídia S. Campos wrote:
> Hi!
> I think there is a mistake into getTargetAddress(OctetString name) of
> SNMPTargetMIB code. Logically, it does not return the address because it
> does not have the key-word "return" when the entry row is not null. Take a
> look it at line 6 from the code below:
> 
> 1  public Address getTargetAddress(OctetString name) {
> 2   OID index = MOTableIndex.createSubIndex(name, true);
> 3   SnmpTargetAddrEntryRow trow =
> 4        (SnmpTargetAddrEntryRow) this.snmpTargetAddrEntryModel.getRow
> (index);
> 5    if (trow != null) {
> 6      trow.getAddress();
> 7   }
> 8    return null;
> 9  }
> 
> Best Regards,
> Nídia
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list