- If a user attempts to remove() the key corresponding to a property, throw IllegalArgumentException.
Can we make this an optional behavior?
The contact for Map.get and Map.remove says that they will return null if the entry is not present or if the value is null. This implies an alternate way to fulfill the Map.remove contract would be to set a local property to null.
// Case 2 -- this is a local property
if (key != null) {
+ if (removeLocal) {
+ return put(key,null);
+ }
+ } else {
PropertyDescriptor descriptor =
(PropertyDescriptor) descriptors.get(key);I'd like to apply this and add constructors that can be used to set "removeLocal". The default could be false, which provices the original behavior, and throws the exception.
I do have a use-case for this involving a working component that does try to use remove.
IMHO, part of our API contract for BaseContext should be that the local properties can be made transparent to a caller of the Map, and that a context should be able to use entries or fields with zero-changes to callers.
-Ted.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
