sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sseif...@apache.org
Subject svn commit: r1680117 - /sling/trunk/testing/mocks/resourceresolver-mock/src/main/java/org/apache/sling/testing/resourceresolver/MockValueMap.java
Date Mon, 18 May 2015 22:34:43 GMT
Author: sseifert
Date: Mon May 18 22:34:43 2015
New Revision: 1680117

URL: http://svn.apache.org/r1680117
Log:
SLING-4723 resourceresolver-mock: Make sure type conversion on write is applied on putAll
method as well

Modified:
    sling/trunk/testing/mocks/resourceresolver-mock/src/main/java/org/apache/sling/testing/resourceresolver/MockValueMap.java

Modified: sling/trunk/testing/mocks/resourceresolver-mock/src/main/java/org/apache/sling/testing/resourceresolver/MockValueMap.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/mocks/resourceresolver-mock/src/main/java/org/apache/sling/testing/resourceresolver/MockValueMap.java?rev=1680117&r1=1680116&r2=1680117&view=diff
==============================================================================
--- sling/trunk/testing/mocks/resourceresolver-mock/src/main/java/org/apache/sling/testing/resourceresolver/MockValueMap.java
(original)
+++ sling/trunk/testing/mocks/resourceresolver-mock/src/main/java/org/apache/sling/testing/resourceresolver/MockValueMap.java
Mon May 18 22:34:43 2015
@@ -49,7 +49,7 @@ public class MockValueMap extends ValueM
     }
 
     public MockValueMap(Resource resource, Map<String,Object> map) {
-        super(convertForWrite(map));
+        super(convertForWriteAll(map));
         this.resource = resource;
     }
 
@@ -109,7 +109,7 @@ public class MockValueMap extends ValueM
     @SuppressWarnings("unchecked")
     @Override
     public void putAll(Map<? extends String, ?> map) {
-        super.putAll((Map<? extends String, ?>)convertForWrite(map));
+        super.putAll((Map<? extends String, ?>)convertForWriteAll((Map<String, Object>)map));
     }
     
     private static Object convertForWrite(Object value) {
@@ -130,7 +130,7 @@ public class MockValueMap extends ValueM
         return value;
     }
     
-    private static Map<String, Object> convertForWrite(Map<String, Object> map)
{
+    private static Map<String, Object> convertForWriteAll(Map<String, Object>
map) {
         Map<String,Object> newMap = new HashMap<String, Object>();
         for (Map.Entry<String, Object> entry : map.entrySet()) {
             newMap.put(entry.getKey(), convertForWrite(entry.getValue()));



Mime
View raw message