[
http://issues.apache.org/jira/browse/JCR-491?page=comments#action_12423458 ]
Nicolas Pombourcq commented on JCR-491:
---------------------------------------
Proposal: change getNodeTypeSpec to omit additional supertypes.
--- nodetype/PredefinedNodeTypeTest.java (revision 422074)
+++ nodetype/PredefinedNodeTypeTest.java (working copy)
@@ -254,17 +254,28 @@
*/
private static String getNodeTypeSpec(NodeType type)
throws RepositoryException {
+ String typeName = type.getName();
StringWriter buffer = new StringWriter();
PrintWriter writer = new PrintWriter(buffer);
writer.println("NodeTypeName");
- writer.println(" " + type.getName());
+ writer.println(" " + typeName);
writer.println("Supertypes");
NodeType[] supertypes = type.getDeclaredSupertypes();
if (supertypes.length > 0) {
Arrays.sort(supertypes, NODE_TYPE_COMPARATOR);
for (int i = 0; i < supertypes.length; i++) {
- writer.println(" " + supertypes[i].getName());
+ String name = supertypes[i].getName();
+ if (name.startsWith("nt:") ||
+ name.startsWith("jcr:") ||
+ (name.equals("mix:referenceable") &&
+ (typeName.equals("mix:versionable") ||
+ typeName.equals("nt:resource") ||
+ typeName.equals("nt:versionHistory") ||
+ typeName.equals("nt:version") ||
+ typeName.equals("nt:frozenNode")))) {
+ writer.println(" " + supertypes[i].getName());
+ }
}
} else {
writer.println(" []");
> TCK: PredefinedNodeTypeTest does not allow additions to the predefined node
> types hierarchy
> -------------------------------------------------------------------------------------------
>
> Key: JCR-491
> URL: http://issues.apache.org/jira/browse/JCR-491
> Project: Jackrabbit
> Issue Type: Bug
> Components: test
> Environment: TCK from SVN revision 421925
> Reporter: Nicolas Pombourcq
>
> As explained in section 6.7.22.2 (page 147) of the JSR 170 specification, an
> implementation is allowed to customize a predefined noe type definition with
> additional supertypes. The tests in PredefinedNodeTypeTest do not account for
> that and expect an exact match with the predefined node types.
--
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