jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r534843 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact: CompactNodeTypeDefReader.java CompactNodeTypeDefWriter.java
Date Thu, 03 May 2007 13:12:33 GMT
Author: dpfister
Date: Thu May  3 06:12:32 2007
New Revision: 534843

URL: http://svn.apache.org/viewvc?view=rev&rev=534843
Log:
JCR-895 - Registering node type names with spaces fails in clustered environment

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java?view=diff&rev=534843&r1=534842&r2=534843
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
Thu May  3 06:12:32 2007
@@ -30,6 +30,7 @@
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.NameFormat;
 import org.apache.jackrabbit.util.name.NamespaceMapping;
+import org.apache.jackrabbit.util.ISO9075;
 import org.apache.jackrabbit.value.ValueHelper;
 import org.apache.jackrabbit.value.ValueFactoryImpl;
 
@@ -632,7 +633,7 @@
      */
     private QName toQName(String stringName) throws ParseException {
         try {
-            return NameFormat.parse(stringName, nsMapping);
+            return ISO9075.decode(NameFormat.parse(stringName, nsMapping));
         } catch (NameException e) {
             lexer.fail("Error while parsing '" + stringName + "'", e);
             return null;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java?view=diff&rev=534843&r1=534842&r2=534843
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefWriter.java
Thu May  3 06:12:32 2007
@@ -35,6 +35,7 @@
 import org.apache.jackrabbit.core.value.InternalValue;
 import org.apache.jackrabbit.name.NamespaceResolver;
 import org.apache.jackrabbit.name.QName;
+import org.apache.jackrabbit.util.ISO9075;
 
 /**
  * Prints node type defs in a compact notation
@@ -378,7 +379,7 @@
                 prefix += ":";
             }
 
-            String resolvedName = prefix + qname.getLocalName();
+            String resolvedName = prefix + ISO9075.encode(qname).getLocalName();
 
             // check for '-' and '+'
             if (resolvedName.indexOf('-') >= 0 || resolvedName.indexOf('+') >= 0) {



Mime
View raw message