jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1133817 - in /jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel: RepositoryServiceImpl.java util/Values.java
Date Thu, 09 Jun 2011 12:06:31 GMT
Author: mduerig
Date: Thu Jun  9 12:06:30 2011
New Revision: 1133817

URL: http://svn.apache.org/viewvc?rev=1133817&view=rev
Log:
spi2microkernel prototype (WIP)
fixed escaping/quoting of string values

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Values.java

Modified: jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1133817&r1=1133816&r2=1133817&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Thu Jun  9 12:06:30 2011
@@ -444,8 +444,8 @@ public class RepositoryServiceImpl exten
             return PathUtil.concat(PathUtil.relativize("/", path), name);
         }
 
-        private void addProperty(NodeId parentId, Name propertyName, String val) throws RepositoryException
{
-            sb.append('^').append(target(parentId, propertyName)).append(" : ").append(val);
+        private void addProperty(NodeId parentId, Name propertyName, String jsonValue) throws
RepositoryException {
+            sb.append('^').append(target(parentId, propertyName)).append(" : ").append(jsonValue);
         }
     }
 

Modified: jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Values.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Values.java?rev=1133817&r1=1133816&r2=1133817&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Values.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/util/Values.java
Thu Jun  9 12:06:30 2011
@@ -86,7 +86,7 @@ public final class Values {
     public static String create(QValue value) throws RepositoryException {
         switch(value.getType()) {
             case PropertyType.STRING:
-                return JsonBuilder.quote(value.getString());
+                return JsonBuilder.quote(JsonBuilder.escape(value.getString()));
 
             case PropertyType.LONG:
             case PropertyType.DOUBLE:



Mime
View raw message