[SNMP4J] Mpv3.setLocalEngineID
kenping
kenping at os.org.cn
Tue Feb 1 11:48:44 CET 2005
Hi, Frank
Why do validate the member field localEngineID in here, but not but not
the method param engineID? Is it a bug?
public void setLocalEngineID(byte[] engineID) {
if ((localEngineID == null) ||
(localEngineID.length < MINLEN_ENGINE_ID) ||
(localEngineID.length > MAXLEN_ENGINE_ID)) {
throw new IllegalArgumentException("Illegal local engine ID");
}
this.localEngineID = engineID;
}
I changed it to:
if ((engineID == null) ||
(engineID.length < MINLEN_ENGINE_ID) ||
(engineID.length > MAXLEN_ENGINE_ID)) {
throw new IllegalArgumentException("Illegal local engine ID");
}
Yours sincerely,
kenping
More information about the SNMP4J
mailing list