[Mibble-users] SizeConstaint.isCompatible( mibValue) doesn't check the size of mibValue.. why not?

2007-01-07 Thread Paul Faid
Hi, I'm wondering why the SizeConstraint doesn't check the size of a mibValue when calling isCompatible(), for example why doesn't it check the length of a stringValue. The javaDoc even says it does nothing: public boolean isCompatible(MibValue value) Checks if the specified value is

Re: [Mibble-users] SizeConstaint.isCompatible( mibValue) doesn't check the size of mibValue.. why not?

2007-01-07 Thread Per Cederberg
Right. Never send code without compiling it first. Here is a more syntactically correct version: public boolean isCompatible(MibValue value) { Integer size; if (value instanceof StringValue) { size = new Integer(value.toString().length()); return