sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sseif...@apache.org
Subject [sling-maven-sling-plugin] 02/03: cosmetic: eliminate references to deprecated org.apache.commons.lang3.CharEncoding
Date Thu, 03 May 2018 06:52:21 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 7b497fef62e345bec7dad5d679d420cc385d1f58
Author: sseifert <sseifert@pro-vision.de>
AuthorDate: Thu May 3 08:49:08 2018 +0200

    cosmetic: eliminate references to deprecated org.apache.commons.lang3.CharEncoding
---
 src/main/java/org/apache/sling/maven/bundlesupport/FsMountMojo.java   | 4 ++--
 .../java/org/apache/sling/maven/bundlesupport/ValidationMojo.java     | 4 ++--
 .../apache/sling/maven/bundlesupport/fsresource/FsMountHelper.java    | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/sling/maven/bundlesupport/FsMountMojo.java b/src/main/java/org/apache/sling/maven/bundlesupport/FsMountMojo.java
index 76ba797..56e9e38 100644
--- a/src/main/java/org/apache/sling/maven/bundlesupport/FsMountMojo.java
+++ b/src/main/java/org/apache/sling/maven/bundlesupport/FsMountMojo.java
@@ -20,6 +20,7 @@ package org.apache.sling.maven.bundlesupport;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -30,7 +31,6 @@ import javax.json.JsonObject;
 import org.apache.commons.httpclient.HttpException;
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.CharEncoding;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -232,7 +232,7 @@ public class FsMountMojo extends AbstractFsMountMojo {
             if ( status == 200 ) {                
                 final String jsonText;
                 try (InputStream jsonResponse = get.getResponseBodyAsStream()) {
-                    jsonText = IOUtils.toString(jsonResponse, CharEncoding.UTF_8);
+                    jsonText = IOUtils.toString(jsonResponse, StandardCharsets.UTF_8);
                 }
                 try {
                     JsonObject response = JsonSupport.parseObject(jsonText);
diff --git a/src/main/java/org/apache/sling/maven/bundlesupport/ValidationMojo.java b/src/main/java/org/apache/sling/maven/bundlesupport/ValidationMojo.java
index aec534a..faa3ba1 100644
--- a/src/main/java/org/apache/sling/maven/bundlesupport/ValidationMojo.java
+++ b/src/main/java/org/apache/sling/maven/bundlesupport/ValidationMojo.java
@@ -21,6 +21,7 @@ package org.apache.sling.maven.bundlesupport;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -30,7 +31,6 @@ import java.util.regex.Pattern;
 import javax.json.JsonException;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.CharEncoding;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.math.NumberUtils;
 import org.apache.maven.model.Resource;
@@ -161,7 +161,7 @@ public class ValidationMojo extends AbstractMojo {
                 String json = null;
                 try {
                     fis = new FileInputStream(file);
-                    json = IOUtils.toString(fis, CharEncoding.UTF_8);
+                    json = IOUtils.toString(fis, StandardCharsets.UTF_8);
                 } catch (IOException ex) {
                     throw new MojoExecutionException(ex.getMessage(), ex);
                 } finally {
diff --git a/src/main/java/org/apache/sling/maven/bundlesupport/fsresource/FsMountHelper.java
b/src/main/java/org/apache/sling/maven/bundlesupport/fsresource/FsMountHelper.java
index 04b4976..5cb25f0 100644
--- a/src/main/java/org/apache/sling/maven/bundlesupport/fsresource/FsMountHelper.java
+++ b/src/main/java/org/apache/sling/maven/bundlesupport/fsresource/FsMountHelper.java
@@ -20,6 +20,7 @@ package org.apache.sling.maven.bundlesupport.fsresource;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -35,7 +36,6 @@ import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.methods.PostMethod;
 import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.CharEncoding;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.logging.Log;
@@ -235,7 +235,7 @@ final class FsMountHelper {
                 }
                 final String jsonText;
                 try (InputStream jsonResponse = get.getResponseBodyAsStream()) {
-                    jsonText = IOUtils.toString(jsonResponse, CharEncoding.UTF_8);
+                    jsonText = IOUtils.toString(jsonResponse, StandardCharsets.UTF_8);
                 }
                 try {
                     JsonArray array = JsonSupport.parseArray(jsonText);

-- 
To stop receiving notification emails like this one, please contact
sseifert@apache.org.

Mime
View raw message