sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [sling-whiteboard] branch master updated: SLING-8570 - Extract a generic Content Parser API from org.apache.sling.jcr.contentparser with pluggable implementations
Date Thu, 11 Jul 2019 13:23:55 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 6c4cc4c  SLING-8570 - Extract a generic Content Parser API from org.apache.sling.jcr.contentparser
with pluggable implementations
6c4cc4c is described below

commit 6c4cc4cae6db99530e81de2226e5ee4b7293cf38
Author: Radu Cotescu <radu@apache.org>
AuthorDate: Thu Jul 11 15:23:46 2019 +0200

    SLING-8570 - Extract a generic Content Parser API from org.apache.sling.jcr.contentparser
with pluggable implementations
    
    * pom clean-up
    * replaced a deprecated import and removed an unused one
---
 .../org-apache-sling-contentparser-api/pom.xml         | 16 ++++++----------
 .../org-apache-sling-contentparser-json/pom.xml        | 18 +++++++-----------
 .../contentparser/json/internal/JsonContentParser.java |  5 ++---
 3 files changed, 15 insertions(+), 24 deletions(-)

diff --git a/contentparser/org-apache-sling-contentparser-api/pom.xml b/contentparser/org-apache-sling-contentparser-api/pom.xml
index bdb4bab..8ad0b57 100644
--- a/contentparser/org-apache-sling-contentparser-api/pom.xml
+++ b/contentparser/org-apache-sling-contentparser-api/pom.xml
@@ -17,13 +17,14 @@
     specific language governing permissions and limitations
     under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling-bundle-parent</artifactId>
         <version>35</version>
-        <relativePath />
+        <relativePath/>
     </parent>
 
     <artifactId>org.apache.sling.contentparser.api</artifactId>
@@ -31,21 +32,16 @@
 
     <name>Apache Sling Content Parser API</name>
     <description>
-        API for parsing Apache Sling Resource trees stored in files (e.g. JSON, FileVault
XML, etc.).
+        API for parsing Apache Sling Resource trees stored in files (e.g. JSON, FileVault
XML, etc.)
     </description>
 
     <scm>
         <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-contentparser-api.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-contentparser-api.git</developerConnection>
         <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-contentparser-api.git</url>
-      <tag>HEAD</tag>
-  </scm>
+        <tag>HEAD</tag>
+    </scm>
 
-    <build>
-        <plugins>
-            
-        </plugins>
-    </build>
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
diff --git a/contentparser/org-apache-sling-contentparser-json/pom.xml b/contentparser/org-apache-sling-contentparser-json/pom.xml
index a33598b..3fc188b 100644
--- a/contentparser/org-apache-sling-contentparser-json/pom.xml
+++ b/contentparser/org-apache-sling-contentparser-json/pom.xml
@@ -17,35 +17,31 @@
     specific language governing permissions and limitations
     under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
         <groupId>org.apache.sling</groupId>
         <artifactId>sling-bundle-parent</artifactId>
         <version>35</version>
-        <relativePath />
+        <relativePath/>
     </parent>
 
     <artifactId>org.apache.sling.contentparser.json</artifactId>
     <version>0.9.0-SNAPSHOT</version>
 
-    <name>Apache Sling Content Parser API</name>
+    <name>Apache Sling Content Parser for JSON</name>
     <description>
-        Parser API Apache Sling Resource trees stored in files (e.g. JSON, FileVault XML,
etc.).
+        Apache Sling Content Parser for resource trees stored in JSON files
     </description>
 
     <scm>
         <connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-contentparser-json.git</connection>
         <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-contentparser-json.git</developerConnection>
         <url>https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-contentparser-json.git</url>
-      <tag>HEAD</tag>
-  </scm>
+        <tag>HEAD</tag>
+    </scm>
 
-    <build>
-        <plugins>
-            
-        </plugins>
-    </build>
     <dependencies>
         <dependency>
             <groupId>org.apache.sling</groupId>
diff --git a/contentparser/org-apache-sling-contentparser-json/src/main/java/org/apache/sling/contentparser/json/internal/JsonContentParser.java
b/contentparser/org-apache-sling-contentparser-json/src/main/java/org/apache/sling/contentparser/json/internal/JsonContentParser.java
index 16d47e0..33f048e 100644
--- a/contentparser/org-apache-sling-contentparser-json/src/main/java/org/apache/sling/contentparser/json/internal/JsonContentParser.java
+++ b/contentparser/org-apache-sling-contentparser-json/src/main/java/org/apache/sling/contentparser/json/internal/JsonContentParser.java
@@ -21,11 +21,11 @@ package org.apache.sling.contentparser.json.internal;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringReader;
+import java.nio.charset.StandardCharsets;
 import java.util.Calendar;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
-import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
@@ -40,7 +40,6 @@ import javax.json.JsonValue;
 import javax.json.stream.JsonParsingException;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.CharEncoding;
 import org.apache.sling.contentparser.api.ContentHandler;
 import org.apache.sling.contentparser.api.ContentParser;
 import org.apache.sling.contentparser.api.JsonParserFeature;
@@ -88,7 +87,7 @@ public class JsonContentParser implements ContentParser {
     private JsonObject toJsonObjectWithJsonTicks(JsonReaderFactory jsonReaderFactory, InputStream
is) {
         String jsonString;
         try {
-            jsonString = IOUtils.toString(is, CharEncoding.UTF_8);
+            jsonString = IOUtils.toString(is, StandardCharsets.UTF_8);
         } catch (IOException ex) {
             throw new ParseException("Error getting JSON string.", ex);
         }


Mime
View raw message