On 7/23/07, Mark Waschkowski <[EMAIL PROTECTED]> wrote:

Hi Alexandru,


Quite obviously, the java language supports any object variables being set
to null, and the some of the apis also supports setting of null values,
for
example: http://java.sun.com/j2se/1.5.0/docs/api/java/util/HashMap.html.
The
key is not removed, just the value.


I'm don't think you can compare the two, a HashMap is a completely different
beast from a JCR.
A HashMap imposes no restrictions on the data that can be stored inside it
for one thing.
What would you do with a mandatory property for example?
Will you allow it to contain a null value? I think not because I would
expect a mandatory property to hold a "real" value.
But if it can't contain null isn't it in fact exactly the same as not having
the property at all?
By definition you'd have to extend this idea to non-mandatory properties as
well because if we think the current situation (where setValue(null) is the
same as a remove()) is confusing think about a system where mandatory and
non-mandatory items have different semantics!

Cheers,
-Tako

Reply via email to