Author: rhauch
Date: 2009-04-01 11:46:00 -0400 (Wed, 01 Apr 2009)
New Revision: 797
Modified:
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DefinitionCache.java
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrNodeType.java
Log:
DNA-338 Definitions That Allow SNS Are Not Used For Nodes Without SNS
Did not apply the patch, since it copied the same logic of
DefinitionCache.allChildNodeDefinitions(Name childName, boolean requireSns) into
JcrNodeType.allChildNodeDefinitions (rather than just calling the same DefinitionCache
method). The patch would have not have changed the behavior. However, a few argument
names were corrected (from "propertyName" to "childName"); likely due
to a copy/paste error.
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DefinitionCache.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DefinitionCache.java 2009-04-01 15:17:06
UTC (rev 796)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/DefinitionCache.java 2009-04-01 15:46:00
UTC (rev 797)
@@ -139,8 +139,8 @@
} else {
childNodeDefinitionsThatAllowNoSns.put(name, definition);
}
+ allChildNodeDefinitions.put(name, definition);
namesFromThisType.add(name);
- allChildNodeDefinitions.put(name, definition);
}
namesFromThisType.clear();
@@ -193,9 +193,10 @@
return this.allChildNodeDefinitions.get(childName);
}
- Collection<JcrNodeDefinition> allChildNodeDefinitions( Name childName,
- boolean requireSns ) {
+ public Collection<JcrNodeDefinition> allChildNodeDefinitions( Name childName,
+ boolean requireSns ) {
if (requireSns) {
+ // Only return definitions that allow SNS since we require SNS support
return childNodeDefinitionsThatAllowSns.get(childName);
}
return allChildNodeDefinitions.get(childName);
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrNodeType.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrNodeType.java 2009-04-01 15:17:06 UTC
(rev 796)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrNodeType.java 2009-04-01 15:46:00 UTC
(rev 797)
@@ -186,13 +186,13 @@
return allDefinitions.allPropertyDefinitions(propertyName);
}
- Collection<JcrNodeDefinition> allChildNodeDefinitions( Name propertyName,
+ Collection<JcrNodeDefinition> allChildNodeDefinitions( Name childName,
boolean requireSns ) {
- return allDefinitions.allChildNodeDefinitions(propertyName, requireSns);
+ return allDefinitions.allChildNodeDefinitions(childName, requireSns);
}
- Collection<JcrNodeDefinition> allChildNodeDefinitions( Name propertyName ) {
- return allDefinitions.allChildNodeDefinitions(propertyName);
+ Collection<JcrNodeDefinition> allChildNodeDefinitions( Name childName ) {
+ return allDefinitions.allChildNodeDefinitions(childName);
}
/**
Show replies by date