jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael D Robinson <mdrob...@thoughtworks.com>
Subject org.apache.jackrabbit.jcr2spi.NodeImpl question
Date Mon, 26 Oct 2009 05:32:46 GMT
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

Mime
View raw message