Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-06-12 10:27:55 -0400
committerAlexander Kurtakov2019-06-12 10:27:55 -0400
commitae3ae7c088df26092b2e0adc8ad89cb7045fe977 (patch)
tree127088236c1d0b84108ef7d83d8afce6e8bb5508
parenta5ba499bd74c8506c9ec017a10dc42952609edc4 (diff)
downloadm2e-core-ae3ae7c088df26092b2e0adc8ad89cb7045fe977.tar.gz
m2e-core-ae3ae7c088df26092b2e0adc8ad89cb7045fe977.tar.xz
m2e-core-ae3ae7c088df26092b2e0adc8ad89cb7045fe977.zip
Do not use Guava's UTF-8 constant.HEADmaster
Use Java's own StandardCharsets one. Change-Id: Ibac7399623499c23521a2903cdb247faafaf11c9 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--org.eclipse.m2e.sourcelookup/src/org/eclipse/m2e/sourcelookup/internal/launch/MavenArtifactIdentifier.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.m2e.sourcelookup/src/org/eclipse/m2e/sourcelookup/internal/launch/MavenArtifactIdentifier.java b/org.eclipse.m2e.sourcelookup/src/org/eclipse/m2e/sourcelookup/internal/launch/MavenArtifactIdentifier.java
index af625b72..eb3776bd 100644
--- a/org.eclipse.m2e.sourcelookup/src/org/eclipse/m2e/sourcelookup/internal/launch/MavenArtifactIdentifier.java
+++ b/org.eclipse.m2e.sourcelookup/src/org/eclipse/m2e/sourcelookup/internal/launch/MavenArtifactIdentifier.java
@@ -17,6 +17,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
+import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
@@ -34,7 +35,6 @@ import org.eclipse.m2e.core.internal.index.IIndex;
import org.eclipse.m2e.core.internal.index.IndexedArtifactFile;
import org.eclipse.m2e.core.internal.index.nexus.CompositeIndex;
-import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableSet;
import com.google.common.hash.Hashing;
import com.google.common.io.Files;
@@ -126,7 +126,7 @@ public class MavenArtifactIdentifier {
try {
String sha1 = Files.hash(file, Hashing.sha1()).toString(); // TODO use Locations for caching
URL url = new URL("https://search.maven.org/solrsearch/select?q=1:" + sha1);
- try (InputStreamReader reader = new InputStreamReader(url.openStream(), Charsets.UTF_8)) {
+ try (InputStreamReader reader = new InputStreamReader(url.openStream(), StandardCharsets.UTF_8)) {
Set<ArtifactKey> result = new LinkedHashSet<>();
JsonObject container = new Gson().fromJson(reader, JsonObject.class);
JsonArray docs = container.get("response").getAsJsonObject().get("docs").getAsJsonArray();

Back to the top