jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-2336) Automatic type conversion no longer works
Date Thu, 01 Oct 2009 09:52:23 GMT

    [ https://issues.apache.org/jira/browse/JCR-2336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761151#action_12761151
] 

Thomas Mueller commented on JCR-2336:
-------------------------------------

There should be a test case in the TCK, but I'm not sure where. Relevant section in the spec
is at page 31:

"3.6.4 Property Type Conversion
When the value of a property is read or written using a type different from that 
declared for the property, the repository attempts a type conversion according to 
the following rules."

Is there a lookup table that links the spec to the TCK tests and back?

> Automatic type conversion no longer works
> -----------------------------------------
>
>                 Key: JCR-2336
>                 URL: https://issues.apache.org/jira/browse/JCR-2336
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.0-alpha11
>            Reporter: Thomas Mueller
>            Assignee: Marcel Reutegger
>             Fix For: 2.0.0
>
>
> String values are no longer converted to binary when required. Example:
> Node n = testRootNode.addNode("testConvert", "nt:file");
> Node content = n.addNode("jcr:content", "nt:resource");
> content.setProperty("jcr:lastModified", Calendar.getInstance());
> content.setProperty("jcr:mimeType", "text/html");
> content.setProperty("jcr:data", "Hello");
> n.getSession().save();
> This used to work in a previous 2.0 build, but now throws:
> javax.jcr.nodetype.ConstraintViolationException: no matching property definition found
for {http://www.jcp.org/jcr/1.0}data
> at org.apache.jackrabbit.core.nodetype.EffectiveNodeType.getApplicablePropertyDef(EffectiveNodeType.java:782)
> at org.apache.jackrabbit.core.NodeImpl.getApplicablePropertyDefinition(NodeImpl.java:747)
> at org.apache.jackrabbit.core.ItemManager.getDefinition(ItemManager.java:241)
> at org.apache.jackrabbit.core.ItemData.getDefinition(ItemData.java:101)
> at org.apache.jackrabbit.core.ItemManager.canRead(ItemManager.java:409)
> at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:383)
> at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:316)
> at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:595)
> at org.apache.jackrabbit.core.NodeImpl.removeChildProperty(NodeImpl.java:554)
> at org.apache.jackrabbit.core.NodeImpl.removeChildProperty(NodeImpl.java:534)
> at org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2303)
> at org.apache.jackrabbit.core.nodetype.ConvertDataTypeTest.testStringToBinary(ConvertDataTypeTest.java:36)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message