jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r554938 - in /jackrabbit/trunk/contrib/spi: commons/src/main/java/org/apache/jackrabbit/value/ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/
Date Tue, 10 Jul 2007 13:32:07 GMT
Author: mreutegg
Date: Tue Jul 10 06:32:05 2007
New Revision: 554938

URL: http://svn.apache.org/viewvc?view=rev&rev=554938
Log:
JCR-1017: Favour QValue.getPath() over getString() where appropriate

Modified:
    jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFormat.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ValueConstraint.java
    jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/StateUtility.java

Modified: jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFormat.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFormat.java?view=diff&rev=554938&r1=554937&r2=554938
==============================================================================
--- jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFormat.java
(original)
+++ jackrabbit/trunk/contrib/spi/commons/src/main/java/org/apache/jackrabbit/value/ValueFormat.java
Tue Jul 10 06:32:05 2007
@@ -154,7 +154,7 @@
                 break;
             case PropertyType.PATH:
                 try {
-                    Path qPath = Path.valueOf(qualifiedValue.getString());
+                    Path qPath = qualifiedValue.getPath();
                     jcrValue = factory.createValue(PathFormat.format(qPath, nsResolver),
propertyType);
                 } catch (NoPrefixDeclaredException npde) {
                     // should never get here...
@@ -163,7 +163,7 @@
                 break;
             case PropertyType.NAME:
                 try {
-                    QName qName = QName.valueOf(qualifiedValue.getString());
+                    QName qName = qualifiedValue.getQName();
                     jcrValue = factory.createValue(NameFormat.format(qName, nsResolver),
propertyType);
                 } catch (NoPrefixDeclaredException npde) {
                     // should never get here...

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ValueConstraint.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ValueConstraint.java?view=diff&rev=554938&r1=554937&r2=554938
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ValueConstraint.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/ValueConstraint.java
Tue Jul 10 06:32:05 2007
@@ -692,7 +692,7 @@
         }
         switch (value.getType()) {
             case PropertyType.PATH:
-                Path p = Path.valueOf(value.getString());
+                Path p = value.getPath();
                 // normalize paths before comparing them
                 Path p0, p1;
                 try {
@@ -801,7 +801,7 @@
         }
         switch (value.getType()) {
             case PropertyType.NAME:
-                QName n = QName.valueOf(value.getString());
+                QName n = value.getQName();
                 if (!name.equals(n)) {
                     throw new ConstraintViolationException(n
                             + " does not satisfy the constraint '"

Modified: jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/StateUtility.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/StateUtility.java?view=diff&rev=554938&r1=554937&r2=554938
==============================================================================
--- jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/StateUtility.java
(original)
+++ jackrabbit/trunk/contrib/spi/jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/util/StateUtility.java
Tue Jul 10 06:32:05 2007
@@ -52,7 +52,7 @@
             QName[] newMixins = new QName[values.length];
             for (int i = 0; i < values.length; i++) {
                 try {
-                    newMixins[i] = QName.valueOf(values[i].getString());
+                    newMixins[i] = values[i].getQName();
                 } catch (RepositoryException e) {
                     // ignore: should never occur.
                 }



Mime
View raw message