jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1522986 - /jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java
Date Fri, 13 Sep 2013 15:51:45 GMT
Author: jukka
Date: Fri Sep 13 15:51:45 2013
New Revision: 1522986

URL: http://svn.apache.org/r1522986
Log:
OAK-1017: Unstable hashes in MicroKernelImpl

Use a TreeMap wrapper to force the order of properties in serialization

Modified:
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java?rev=1522986&r1=1522985&r2=1522986&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java
Fri Sep 13 15:51:45 2013
@@ -24,6 +24,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.TreeMap;
 
 /**
  *
@@ -148,7 +149,8 @@ public abstract class AbstractNode imple
     }
 
     public void serialize(Binding binding) throws Exception {
-        final Iterator<Map.Entry<String, String>> iter = properties.entrySet().iterator();
+        final Iterator<Map.Entry<String, String>> iter =
+                new TreeMap<String, String>(properties).entrySet().iterator();
         binding.writeMap(":props", properties.size(),
                 new Binding.StringEntryIterator() {
                     @Override



Mime
View raw message