incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject svn commit: r980080 - in /sling/trunk: bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java launchpad/integration-tests/src/main/resources/integration-test/servlets/post/testimport.json
Date Wed, 28 Jul 2010 14:50:59 GMT
Author: ieb
Date: Wed Jul 28 14:50:58 2010
New Revision: 980080

URL: http://svn.apache.org/viewvc?rev=980080&view=rev
Log:
SLING-1613 Fixed and change the test pattern to include arrays.

Modified:
    sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java
    sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/servlets/post/testimport.json

Modified: sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java?rev=980080&r1=980079&r2=980080&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java
(original)
+++ sling/trunk/bundles/jcr/contentloader/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java
Wed Jul 28 14:50:58 2010
@@ -214,7 +214,7 @@ public class JsonReader implements Conte
                 for (int i = 0; i < array.length(); i++) {
                     values[i] = array.get(i).toString();
                 }
-                final int propertyType = getType(name, values[0]);
+                final int propertyType = getType(name, array.get(0));
                 contentCreator.createProperty(getName(name), propertyType, values);
             } else {
                 contentCreator.createProperty(getName(name), PropertyType.STRING, new String[0]);

Modified: sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/servlets/post/testimport.json
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/servlets/post/testimport.json?rev=980080&r1=980079&r2=980080&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/servlets/post/testimport.json
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/servlets/post/testimport.json
Wed Jul 28 14:50:58 2010
@@ -6,5 +6,19 @@
 	"propOne" : "propOneValue",
 	"childOne" : {
 		"childPropOne" : true
-	}
-}
\ No newline at end of file
+	},
+        "propIntArray" : [
+              1,
+              2,
+              3,
+              4
+        ],
+        "propBoolArray" : [
+              true,
+              false,
+              true,
+              true,
+              false,
+              false
+        ]
+}



Mime
View raw message