Hello jackrabbit-dev.
In the file:
/jackrabbit/src/test/org/apache/jackrabbit/test/api/BooleanPropertyTest.java
from line 52 it says:
-----------------------------------------------------------
public void testValue() throws RepositoryException {
if (multiple) {
try {
prop.getBoolean();
fail("Property.getBoolean() called on a multivalue property " +
"should throw a ValueFormatException.");
} catch (ValueFormatException vfe) {
// ok
}
}
boolean bool = prop.getValue().getBoolean();
boolean otherBool = prop.getBoolean();
assertTrue("Value.getBoolean() and Property.getBoolean() " +
"return different values.", bool == otherBool) ;
}
-----------------------------------------------------------
As far as I understand the specification,
if current property is indeed multi-valued,
calling call prop.getValue() should throw ValueFormatException.
So, shouldn't it say instead:
-----------------------------------------------------------
public void testValue() throws RepositoryException {
if (multiple) {
try {
prop.getBoolean();
fail("Property.getBoolean() called on a multivalue property " +
"should throw a ValueFormatException.");
} catch (ValueFormatException vfe) {
// ok
}
} else {
boolean bool = prop.getValue().getBoolean();
boolean otherBool = prop.getBoolean();
assertTrue("Value.getBoolean() and Property.getBoolean() " +
"return different values.", bool == otherBool) ;
}
}
-----------------------------------------------------------
Thank you.
--
Best regards, Maxim.
Anahoret Team.