commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter royal <pro...@apache.org>
Subject Re: [PATCH] Re: [jexl] - checking for unresolved variables
Date Sun, 11 Jan 2004 19:46:18 GMT
On Jan 10, 2004, at 5:56 PM, Bill Horsman 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.

Unless the new exception was a subclass of RuntimeException :)
-pete


---------------------------------------------------------------------
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