jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1134537 - in /jackrabbit/sandbox/spi2microkernel/src: main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
Date Sat, 11 Jun 2011 07:33:07 GMT
Author: thomasm
Date: Sat Jun 11 07:33:06 2011
New Revision: 1134537

URL: http://svn.apache.org/viewvc?rev=1134537&view=rev
Log:
Ugly hack no longer needed; fix hardcoded JSON

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
    jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.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=1134537&r1=1134536&r2=1134537&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
Sat Jun 11 07:33:06 2011
@@ -441,14 +441,12 @@ public class RepositoryServiceImpl exten
 
         public void commit() throws RepositoryException {
             String rev = getRevision(sessionInfo);
-            // TODO ugly hack:
-            // remove trailing new line. DiffParser messes up otherwise
-            jsop.deleteCharAt(jsop.length() - 1);
             rev = microKernel.commit("/", jsop.toString(), rev);
             setRevision(sessionInfo, rev);
         }
 
         private String target(NodeId nodeId) throws RepositoryException {
+            // TODO this is not correctly escaped
             return "\"" + PathUtil.relativize("/", Paths.translateQPath(sessionInfo.getWorkspaceName(),
nodeId.getPath())) + "\"";
         }
 

Modified: jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java?rev=1134537&r1=1134536&r2=1134537&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/RepositoryTest.java
Sat Jun 11 07:33:06 2011
@@ -61,16 +61,16 @@ public class RepositoryTest {
 
         if (!mk.nodeExists("/default", head)) {
             head = mk.commit("/",
-                "+default : {" +
+                "+\"default\" : {" +
                     "\"{}foo\" : {" +
                         "\"{}stringProp\":\"stringVal\"," +
                         "\"{}intProp\":42," +
-                        "\"{}mvProp\":[1,2,3]} " +
+                        "\"{}mvProp\":[1,2,3]}, " +
                     "\"{}bar\" : {}}", head);
         }
 
         if (!mk.nodeExists("/default/{}" + testNode, head)) {
-            mk.commit("/default", "+{}" + testNode + " : {}", head);
+            mk.commit("/default", "+\"{}" + testNode + "\" : {}", head);
         }
 
         mk.dispose();



Mime
View raw message