Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2016-07-08 09:01:43 +0000
committerAlexander Kurtakov2016-07-08 09:01:43 +0000
commitdfbf925d5d364bcd5f5a7d841b44fe0860bef3db (patch)
tree0dd3cf2d276285606e3449272d27db319183ed3f /org.eclipse.ua.tests/help
parent2ef1e5d654acfaf55187ee45921a2270695b6142 (diff)
downloadeclipse.platform.ua-dfbf925d5d364bcd5f5a7d841b44fe0860bef3db.tar.gz
eclipse.platform.ua-dfbf925d5d364bcd5f5a7d841b44fe0860bef3db.tar.xz
eclipse.platform.ua-dfbf925d5d364bcd5f5a7d841b44fe0860bef3db.zip
Bug 497548 - Make use of StandardCharsetsI20160708-1700
All the various places defining and using different UTF-8 charset name constants is too error prone. Let's stick to StandardCharsets.UTF-8 which even saves the string lookup too. Change-Id: Idcb356d0293cd2d0d0148de4e1f2e131584d09c4 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.ua.tests/help')
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemoteTestUtils.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemoteTestUtils.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemoteTestUtils.java
index 288d85bb8..15de6424f 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemoteTestUtils.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/RemoteTestUtils.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ package org.eclipse.ua.tests.help.remote;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
@@ -54,8 +53,7 @@ public class RemoteTestUtils {
return readFromURL(url);
}
- public static String readFromURL(URL url) throws IOException,
- UnsupportedEncodingException {
+ public static String readFromURL(URL url) throws IOException {
try (InputStream is = url.openStream();
InputStreamReader inputStreamReader = new InputStreamReader(is, StandardCharsets.UTF_8)) {
StringBuffer buffer = new StringBuffer();

Back to the top