sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-org-apache-sling-mongodb] 08/36: SLING-2530 : Implement CRUD based on resources
Date Wed, 18 Oct 2017 23:24:56 GMT
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-mongodb.git

commit ab55fbc419effedcdfbd5353a1f63467bf6e0eb7
Author: Carsten Ziegeler <cziegeler@apache.org>
AuthorDate: Thu Sep 27 09:05:35 2012 +0000

    SLING-2530 : Implement CRUD based on resources
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1390902 13f79535-47bb-0310-9956-ffa450edef68
---
 src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java b/src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java
index 5bc0f15..c294d84 100644
--- a/src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java
+++ b/src/main/java/org/apache/sling/mongodb/impl/ReadableValueMap.java
@@ -39,10 +39,10 @@ public class ReadableValueMap implements ValueMap {
 
     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);

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <commits@sling.apache.org>.

Mime
View raw message