You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:47:58 UTC

[sling-org-apache-sling-jcr-contentloader] 18/28: SLING-1583 Changed name to :name and added to ignore list.

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.contentloader-2.1.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-contentloader.git

commit af5c7d35aca47597b262e5c7f64d3b0a7c5774d0
Author: Ian Boston <ie...@apache.org>
AuthorDate: Fri Jul 2 22:25:40 2010 +0000

    SLING-1583  Changed name to :name and added to ignore list.
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/contentloader@960127 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/sling/jcr/contentloader/internal/readers/JsonReader.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java b/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java
index 4889357..01696e0 100644
--- a/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java
+++ b/src/main/java/org/apache/sling/jcr/contentloader/internal/readers/JsonReader.java
@@ -105,6 +105,7 @@ public class JsonReader implements ContentReader {
         ignoredNames.add("jcr:successors");
         ignoredNames.add("jcr:checkedOut");
         ignoredNames.add("jcr:created");
+        ignoredNames.add(":name");
     }
 
     private static final Set<String> ignoredPrincipalPropertyNames = new HashSet<String>();
@@ -156,7 +157,7 @@ public class JsonReader implements ContentReader {
             }
 
             JSONObject json = new JSONObject(jsonString);
-            String optionalName = json.optString("name", null);
+            String optionalName = json.optString(":name", null);
             this.createNode(optionalName, json, contentCreator);
         } catch (JSONException je) {
             throw (IOException) new IOException(je.getMessage()).initCause(je);

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