jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r293043 - in /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: nodetype/xml/NodeTypeReader.java query/sql/JCRSQLQueryBuilder.java query/xpath/XPathQueryBuilder.java
Date Sat, 01 Oct 2005 23:47:22 GMT
Author: jukka
Date: Sat Oct  1 16:47:12 2005
New Revision: 293043

URL: http://svn.apache.org/viewcvs?rev=293043&view=rev
Log:
Use the QName constants if possible.

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java?rev=293043&r1=293042&r2=293043&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
Sat Oct  1 16:47:12 2005
@@ -202,7 +202,7 @@
         PropDefImpl def = new PropDefImpl();
         String name = walker.getAttribute(Constants.NAME_ATTRIBUTE);
         if (name.equals("*")) {
-            def.setName(new QName("", "*"));
+            def.setName(QName.WILDCARD);
         } else {
             def.setName(QName.fromJCRName(name, resolver));
         }
@@ -281,7 +281,7 @@
         NodeDefImpl def = new NodeDefImpl();
         String name = walker.getAttribute(Constants.NAME_ATTRIBUTE);
         if (name.equals("*")) {
-            def.setName(new QName("", "*"));
+            def.setName(QName.WILDCARD);
         } else {
             def.setName(QName.fromJCRName(name, resolver));
         }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java?rev=293043&r1=293042&r2=293043&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/sql/JCRSQLQueryBuilder.java
Sat Oct  1 16:47:12 2005
@@ -528,7 +528,7 @@
         pathNode.setAbsolute(true);
 
         if (path.equals("/")) {
-            pathNode.addPathStep(new LocationStepQueryNode(pathNode, new QName("", ""), false));
+            pathNode.addPathStep(new LocationStepQueryNode(pathNode, QName.EMPTY, false));
             pathConstraints.add(pathNode);
             return;
         }
@@ -539,13 +539,13 @@
             if (names[i].length() == 0) {
                 if (i == 0) {
                     // root
-                    pathNode.addPathStep(new LocationStepQueryNode(pathNode, new QName("",
""), false));
+                    pathNode.addPathStep(new LocationStepQueryNode(pathNode, QName.EMPTY,
false));
                 } else {
                     // descendant '//' -> invalid path
                     // todo throw or ignore?
                     // we currently do not throw and add location step for an
                     // empty name (which is basically the root node)
-                    pathNode.addPathStep(new LocationStepQueryNode(pathNode, new QName("",
""), false));
+                    pathNode.addPathStep(new LocationStepQueryNode(pathNode, QName.EMPTY,
false));
                 }
             } else {
                 int idx = names[i].indexOf('[');

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java?rev=293043&r1=293042&r2=293043&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/query/xpath/XPathQueryBuilder.java
Sat Oct  1 16:47:12 2005
@@ -503,7 +503,7 @@
                     if (queryNode.getType() == QueryNode.TYPE_LOCATION) {
                         QName name = ISO9075.decode(QName.fromJCRName(child.getValue(), resolver));
                         if (name.equals(JCR_ROOT)) {
-                            name = new QName("", "");
+                            name = QName.EMPTY;
                         }
                         ((LocationStepQueryNode) queryNode).setNameTest(name);
                     } else if (queryNode.getType() == QueryNode.TYPE_DEREF) {



Mime
View raw message