incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r834821 - /sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java
Date Wed, 11 Nov 2009 09:43:49 GMT
Author: fmeschbe
Date: Wed Nov 11 09:43:49 2009
New Revision: 834821

URL: http://svn.apache.org/viewvc?rev=834821&view=rev
Log:
SLING-1178 Apply patch by Tobias Bocanegra (thanks)

Modified:
    sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java

Modified: sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java?rev=834821&r1=834820&r2=834821&view=diff
==============================================================================
--- sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java
(original)
+++ sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/operations/ModifyOperation.java
Wed Nov 11 09:43:49 2009
@@ -19,8 +19,8 @@
 package org.apache.sling.servlets.post.impl.operations;
 
 import java.util.Arrays;
-import java.util.HashMap;
 import java.util.HashSet;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -212,12 +212,12 @@
 
         String path = response.getPath();
         if (!session.itemExists(path)) {
-            
+
             deepGetOrCreateNode(session, path, reqProperties, changes);
             response.setCreateRequest(true);
-            
+
         } else {
-            
+
             String[] mixins = getMixinTypes(reqProperties, path);
             if (mixins != null) {
 
@@ -235,7 +235,7 @@
                             node.removeMixin(mixinName);
                         }
                     }
-                    
+
                     // add new mixins
                     for (String mixin : newMixins) {
                         node.addMixin(mixin);
@@ -382,21 +382,21 @@
         for (RequestProperty property : reqProperties.values()) {
 
             if (property.isDelete() && session.itemExists(property.getPath())) {
-            
+
                 if (property.getName().equals("jcr:mixinTypes")) {
-                    
+
                     // clear all mixins
                     Node parent = (Node) session.getItem(property.getParentPath());
                     for (NodeType mixin : parent.getMixinNodeTypes()) {
                         parent.removeMixin(mixin.getName());
                     }
-                    
+
                 } else {
-                    
+
                     session.getItem(property.getPath()).remove();
-                    
+
                 }
-                
+
                 changes.add(Modification.onDeleted(property.getPath()));
             }
         }
@@ -447,7 +447,7 @@
         boolean requireItemPrefix = requireItemPathPrefix(request);
 
         // walk the request parameters and collect the properties
-        Map<String, RequestProperty> reqProperties = new HashMap<String, RequestProperty>();
+        LinkedHashMap<String, RequestProperty> reqProperties = new LinkedHashMap<String,
RequestProperty>();
         for (Map.Entry<String, RequestParameter[]> e : request.getRequestParameterMap().entrySet())
{
             final String paramName = e.getKey();
 



Mime
View raw message