[
https://issues.apache.org/jira/browse/SLING-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589066#action_12589066
]
Bertrand Delacretaz commented on SLING-382:
-------------------------------------------
That's perfect, and the included test makes it easy to decide to commit this!
We might need a more sophisticated mechanism later on, but this is fine for
now, IMHO. On my way to committing...
> VersionHistoryImpl is incorrectly wrapped as a Node in server-side javascript
> ------------------------------------------------------------------------------
>
> Key: SLING-382
> URL: https://issues.apache.org/jira/browse/SLING-382
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Reporter: Bertrand Delacretaz
> Priority: Minor
> Attachments: SLING-382.diff
>
>
> The toString() code in this ESP code fails when applied to a versionable Node:
> var history = currentNode.getVersionHistory();
> out.println(history);
> out.write("<br/>");
> out.println(history.toString());
> out.write("<br/>");
> IIUC the cause is that in SlingWrapFactory.wrapAsJavaObject, the jackrabbit
> VersionHistoryImpl is incorrectly wrapped with a ScriptableNode, as
> VersionHistoryImpl extends from NodeImpl and there's no specific wrapper for
> VersionHistoryImpl.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.