[
https://jira.jboss.org/jira/browse/DNA-344?page=com.atlassian.jira.plugin...
]
Brian Carothers updated DNA-344:
--------------------------------
Attachment: DNA-344.patch
Here's a crude, but effective patch for the defect. In practice, I wonder if doing an
eager conversion to the correct type for JcrValue's internal value would allow us to
remove a bunch of the conditional "pre-casts" in JcrValue.withTypeAndValue.
JcrSession.getValueFactory.create(String, int) Does Not Fail Fast as
per Specification
--------------------------------------------------------------------------------------
Key: DNA-344
URL:
https://jira.jboss.org/jira/browse/DNA-344
Project: DNA
Issue Type: Bug
Components: JCR
Affects Versions: 0.4
Reporter: Brian Carothers
Attachments: DNA-344.patch
Section 7.1.5.3 of the JCR 1.0.1 specification (pg 199) indicates that
ValueFactory.create(String value, int propertyType) should throw a ValueFormatException if
value cannot be converted to the correct type. We currently defer all casts of the value
and do not fail fast.
This prevents one of the test cases in the L2 TCK test ValueFactoryTest from passing
successfully.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira