Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-06-21 08:15:49 -0400
committerAlexander Kurtakov2017-06-21 08:21:08 -0400
commit59162e661ff01d376d08a5db825dcbc0e90cd561 (patch)
treec50cbfaba596c4ba73ac9d6041cb1c9f501064bf /bundles
parent95c2979c2b0a297031f294e2715a09cdc5921853 (diff)
downloadeclipse.platform.team-59162e661ff01d376d08a5db825dcbc0e90cd561.tar.gz
eclipse.platform.team-59162e661ff01d376d08a5db825dcbc0e90cd561.tar.xz
eclipse.platform.team-59162e661ff01d376d08a5db825dcbc0e90cd561.zip
Bug 518569 - Use StandardCharsetsI20170621-2000
Change-Id: Ia2c156836e394226b450c1ca5c1e335b93f1eb65 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java7
2 files changed, 6 insertions, 6 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java
index 0ecdde471..506750a70 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/XMLWriter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -11,6 +11,7 @@
package org.eclipse.team.internal.ccvs.ui;
import java.io.*;
+import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
@@ -25,7 +26,7 @@ public class XMLWriter extends PrintWriter {
protected static final String XML_VERSION = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; //$NON-NLS-1$
public XMLWriter(OutputStream output) throws UnsupportedEncodingException {
- super(new OutputStreamWriter(output, "UTF8")); //$NON-NLS-1$
+ super(new OutputStreamWriter(output, StandardCharsets.UTF_8));
tab = 0;
println(XML_VERSION);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
index 89791b619..c8713aa8b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -12,6 +12,7 @@ package org.eclipse.team.internal.ui;
import java.io.*;
import java.lang.reflect.InvocationTargetException;
+import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.List;
@@ -193,10 +194,8 @@ public class ProjectSetImporter {
private static XMLMemento filenameToXMLMemento(String filename) throws InvocationTargetException {
InputStreamReader reader = null;
try {
- reader = new InputStreamReader(new FileInputStream(filename), "UTF-8"); //$NON-NLS-1$
+ reader = new InputStreamReader(new FileInputStream(filename), StandardCharsets.UTF_8);
return XMLMemento.createReadRoot(reader);
- } catch (UnsupportedEncodingException e) {
- throw new InvocationTargetException(e);
} catch (FileNotFoundException e) {
throw new InvocationTargetException(e);
} catch (WorkbenchException e) {

Back to the top