commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Horsman <b...@logicalcobwebs.co.uk>
Subject Re: [PATCH] Re: [jexl] - checking for unresolved variables
Date Sat, 10 Jan 2004 22:56:50 GMT
On Sat, 2004-01-10 at 23:43, Paul Libbrecht wrote:

> Do you mean the methods of the java.util.Map interface constrain the 
> implementation ?

That's not what I meant, but actually it does :) My getVar() method
throws an UnknownVariableException and in order to maintain that API I
would have to make the Map's get() method also throw that Exception.
Only you can't do that.

So if implement the Map interface (or expose it) then you run the risk
of another class just calling get() instead of getVar() and bypassing my
strict variable check.

For completeness, my original point was that the Map interface wasn't
restrictive enough. We can always add additional Map-like methods if
people need them: clear() for instance. 

-
Bill


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message