jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1133802 - in /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk: json/DiffParser.java store/CommitBuilder.java
Date Thu, 09 Jun 2011 11:35:25 GMT
Author: thomasm
Date: Thu Jun  9 11:35:25 2011
New Revision: 1133802

URL: http://svn.apache.org/viewvc?rev=1133802&view=rev
Log:
Support removing properties.

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/DiffParser.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/CommitBuilder.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/DiffParser.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/DiffParser.java?rev=1133802&r1=1133801&r2=1133802&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/DiffParser.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/json/DiffParser.java
Thu Jun  9 11:35:25 2011
@@ -231,7 +231,6 @@ public class DiffParser {
                 break;
             case SYMBOL_SET_PROPERTY:
                 handler.setProperty(path, value);
-                // handler.setProperty(path, value);
                 break;
             case SYMBOL_MOVE:
                 handler.move(path, value);

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/CommitBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/CommitBuilder.java?rev=1133802&r1=1133801&r2=1133802&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/CommitBuilder.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/CommitBuilder.java
Thu Jun  9 11:35:25 2011
@@ -132,7 +132,12 @@ public class CommitBuilder {
     public void setProperty(String nodePath, String propName, String propValue) throws Exception
{
         MutableNode node = getOrCreateStagedNode(nodePath);
 
-        node.getProperties().put(propName, propValue);
+        Map<String, String> properties = node.getProperties();
+        if ("null".equals(propValue)) {
+            properties.remove(propName);
+        } else {
+            properties.put(propName, propValue);
+        }
 
         // update change log
         changeLog.add(new SetProperty(nodePath, propName, propValue));



Mime
View raw message