Hi,

I was reviewing source code[1], and found a bit I didn't understand:

317      public Property setProperty(String name, String value) throws
ValueFormatException, VersionException, LockException,
ConstraintViolationException, RepositoryException {
318     // validation performed in subsequent method
319     Value v = (value == null) ? null :
session.getValueFactory().createValue(value, PropertyType.STRING);
320     return setProperty(name, v, PropertyType.UNDEFINED);
321     }

Why does this code create a value of PropertyType.STRING, and then use
it to set a property of type PropertyType.UNDEFINED?

Thanks.

    -Michael Robinson

[1] 
http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?view=markup

Reply via email to