Skip to content

Commit

Permalink
cosmetic: eliminate references to deprecated org.apache.commons.lang3…
Browse files Browse the repository at this point in the history
….CharEncoding
  • Loading branch information
stefanseifert committed May 3, 2018
1 parent 5032ce9 commit 7b497fe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
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;

Expand All @@ -30,7 +31,6 @@
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;
Expand Down Expand Up @@ -232,7 +232,7 @@ private String getBundleInstalledVersion(final String bundleSymbolicName, final
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
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;
Expand All @@ -30,7 +31,6 @@
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;
Expand Down Expand Up @@ -161,7 +161,7 @@ private void validate(final File file) throws MojoExecutionException {
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

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;
Expand All @@ -35,7 +36,6 @@
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;
Expand Down Expand Up @@ -235,7 +235,7 @@ public Map<String,FsResourceConfiguration> getCurrentConfigurations(final String
}
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);
Expand Down

0 comments on commit 7b497fe

Please sign in to comment.