incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1390902 - /sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java
Date Thu, 27 Sep 2012 09:05:35 GMT
Author: cziegeler
Date: Thu Sep 27 09:05:35 2012
New Revision: 1390902

URL: http://svn.apache.org/viewvc?rev=1390902&view=rev
Log:
SLING-2530 : Implement CRUD based on resources

Modified:
    sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java

Modified: sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java?rev=1390902&r1=1390901&r2=1390902&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java
(original)
+++ sling/trunk/contrib/extensions/mongodb/src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java
Thu Sep 27 09:05:35 2012
@@ -39,10 +39,10 @@ public class ReadableValueMap implements
 
     protected void createValueMap(final DBObject dbObject) {
         final Map<String, Object> map = new HashMap<String, Object>();
-        for(final Map.Entry<String, Object> entry : map.entrySet()) {
-            final String name = MongoDBResourceProvider.keyToPropName(entry.getKey());
+        for(final String key : dbObject.keySet()) {
+            final String name = MongoDBResourceProvider.keyToPropName(key);
             if ( name != null ) {
-                map.put(name, entry.getValue());
+                map.put(key, dbObject.get(name));
             }
         }
         this.valueMap = Collections.unmodifiableMap(map);



Mime
View raw message