jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r295089 - in /incubator/jackrabbit/trunk/src: java/org/apache/jackrabbit/core/nodetype/virtual/ java/org/apache/jackrabbit/core/query/ test/org/apache/jackrabbit/core/nodetype/xml/
Date Wed, 05 Oct 2005 19:35:16 GMT
Author: jukka
Date: Wed Oct  5 12:35:09 2005
New Revision: 295089

URL: http://svn.apache.org/viewcvs?rev=295089&view=rev
Log:
Replaced ItemDef.ANY_NAME.equals(itemDef.getName()) with itemDef.definesResidual()

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/PropertyTypeRegistry.java
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java?rev=295089&r1=295088&r2=295089&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
Wed Oct  5 12:35:09 2005
@@ -199,7 +199,7 @@
         String uuid = calculateStableUUID(ntDef.getName().toString() + "/" + QName.JCR_PROPERTYDEFINITION.toString()
+ "/" + n);
         VirtualNodeState pState = createNodeState(parent, QName.JCR_PROPERTYDEFINITION, uuid,
QName.NT_PROPERTYDEFINITION);
         // add properties
-        if (!propDef.getName().equals(ItemDef.ANY_NAME)) {
+        if (!propDef.definesResidual()) {
             pState.setPropertyValue(QName.JCR_NAME, InternalValue.create(propDef.getName()));
         }
         pState.setPropertyValue(QName.JCR_AUTOCREATED, InternalValue.create(propDef.isAutoCreated()));
@@ -234,7 +234,7 @@
         String uuid = calculateStableUUID(ntDef.getName().toString() + "/" + QName.JCR_CHILDNODEDEFINITION.toString()
+ "/" + n);
         VirtualNodeState pState = createNodeState(parent, QName.JCR_CHILDNODEDEFINITION,
uuid, QName.NT_CHILDNODEDEFINITION);
         // add properties
-        if (!cnDef.getName().equals(ItemDef.ANY_NAME)) {
+        if (!cnDef.definesResidual()) {
             pState.setPropertyValue(QName.JCR_NAME, InternalValue.create(cnDef.getName()));
         }
         pState.setPropertyValue(QName.JCR_AUTOCREATED, InternalValue.create(cnDef.isAutoCreated()));

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/PropertyTypeRegistry.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/PropertyTypeRegistry.java?rev=295089&r1=295088&r2=295089&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/PropertyTypeRegistry.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/PropertyTypeRegistry.java
Wed Oct  5 12:35:09 2005
@@ -90,9 +90,9 @@
             PropDef[] propDefs = def.getPropertyDefs();
             synchronized (typeMapping) {
                 for (int i = 0; i < propDefs.length; i++) {
-                    QName name = propDefs[i].getName();
                     int type = propDefs[i].getRequiredType();
-                    if (!ItemDef.ANY_NAME.equals(name) && type != PropertyType.UNDEFINED)
{
+                    if (!propDefs[i].definesResidual() && type != PropertyType.UNDEFINED)
{
+                        QName name = propDefs[i].getName();
                         // only remember defined property types
                         TypeMapping[] types = (TypeMapping[]) typeMapping.get(name);
                         if (types == null) {

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java?rev=295089&r1=295088&r2=295089&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java
Wed Oct  5 12:35:09 2005
@@ -200,8 +200,7 @@
         assertEquals("itemNodeType propertyDefs",
                 10, def.getPropertyDefs().length);
         PropDef[] defs = def.getPropertyDefs();
-        assertEquals("itemNodeType wildcard property",
-                ItemDef.ANY_NAME, defs[0].getName());
+        assertTrue("itemNodeType wildcard property", defs[0].definesResidual());
     }
 
     /** Test for the empty item definition. */



Mime
View raw message