You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2006/08/02 18:55:14 UTC
[jira] Resolved: (JCR-513) TCK: SetPropertyAssumeTypeTest doesn't
allow ValueFormatException upon type conversion failure
[ http://issues.apache.org/jira/browse/JCR-513?page=all ]
Marcel Reutegger resolved JCR-513.
----------------------------------
Fix Version/s: 1.1
Resolution: Fixed
Fixed as suggested.
svn revision: 428051
Thank you for reporting this issue.
> TCK: SetPropertyAssumeTypeTest doesn't allow ValueFormatException upon type conversion failure
> ----------------------------------------------------------------------------------------------
>
> Key: JCR-513
> URL: http://issues.apache.org/jira/browse/JCR-513
> Project: Jackrabbit
> Issue Type: Bug
> Components: test
> Reporter: David Pitfield
> Fix For: 1.1
>
>
> SetPropertyAssumeTypeTest# testValuesConstraintVioloationExceptionBecauseOfInvalidTypeParameter
> This test should allow an implementation to throw ValueFormatException. In Section 7.1.5, the Javadoc for setProperty(String, Value[] int) states: "If the property type of the supplied Value objects is different from that specified, then a best-effort conversion is attempted. If the conversion fails, a ValueFormatException is thrown."
> Proposal: catch and consume ValueFormatException.
> --- SetPropertyAssumeTypeTest.java (revision 422074)
> +++ SetPropertyAssumeTypeTest.java (working copy)
> @@ -28,6 +28,7 @@
> import javax.jcr.PropertyType;
> import javax.jcr.RepositoryException;
> import javax.jcr.Property;
> +import javax.jcr.ValueFormatException;
> import java.util.Calendar;
> import java.util.Date;
>
> @@ -525,6 +526,9 @@
> catch (ConstraintViolationException e) {
> // success
> }
> + catch (ValueFormatException e) {
> + // success
> + }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira