[SNMP4J] Re: Mpv3.setLocalEngineID

Frank Fock fock at agentpp.com
Wed Feb 2 01:32:21 CET 2005


Hi Kenping,

Yes, you are right. I have changed it for v1.1 too.
I think v1.1 can be released tomorrow - just need
to update the docs etc.

Best regards,
Frank

kenping wrote:

> 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