jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Landelle (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1893) incorrect node type use for frozenNode in ObjectConverterImpl
Date Thu, 11 Dec 2008 17:49:44 GMT

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

Stephane Landelle commented on JCR-1893:
----------------------------------------

I have the same issue.

ObjectConverterImpl.getObject(Session session, Class clazz, String path) indeed fails on a
frozen node because on contrary to getObject(Session session, String path) it doesn't fall
back to the jcr:frozenPrimaryType when the primary type is nt:frozenNode.

The correction is very simple : just add the following test at line 446 in ObjectConverterImpl:

if (nodeType.equals(ManagerConstant.FROZEN_NODE_TYPE)) {
	nodeType = node.getProperty(ManagerConstant.FROZEN_PRIMARY_TYPE_PROPERTY).getString();
}

Could the trunk be patched with this?

Best regards,

St├ęphane Landelle



> incorrect node type use for frozenNode in ObjectConverterImpl
> -------------------------------------------------------------
>
>                 Key: JCR-1893
>                 URL: https://issues.apache.org/jira/browse/JCR-1893
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-ocm
>    Affects Versions: 1.6.0
>            Reporter: Sandrine Raffalli
>
> The class ObjectConverterImpl provides two methods :
> public Object getObject(Session session, String path);
> public Object getObject(Session session, Class clazz, String path);
> In the first method, if the current node has not a discriminator class name property,
the class descriptor is found with the primaryNodeType or in case of frozen node, with the
frozen primary node type .
> In the second method, the class descriptor is retrieved with the given class and next
an alternative descriptor is tried to find, first with a class name discriminator and next
with the node type of the current node. But if the current node is a frozen node, a class
descriptor is search for the node type "nt:frozenNode" that have no sense.
> A check must be added in the second method if the current node is a frozen node and retrieve
the frozen primary node type and not the primary node type that is "nt:frozenNode" in this
case.

-- 
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