Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-05-08 10:59:48 +0000
committerKarsten Thoms2018-05-09 09:59:36 +0000
commit1e7a29e071953ebb2101ad3b6c582b560b49845d (patch)
treed030972df65f98ab09bf7c71f0bd50e001a95314 /org.eclipse.debug.core
parent3d920a7a364fdc3fa02da2c12f056ca4375525ce (diff)
downloadeclipse.platform.debug-1e7a29e071953ebb2101ad3b6c582b560b49845d.tar.gz
eclipse.platform.debug-1e7a29e071953ebb2101ad3b6c582b560b49845d.tar.xz
eclipse.platform.debug-1e7a29e071953ebb2101ad3b6c582b560b49845d.zip
Bug 533788 - Use StandardCharsetsI20180509-0800
Another bunch of such changes. Change-Id: I4012772607b8f7c165156b8d03fbd5bcbee4b581 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java3
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java5
2 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
index c46f4bab3..fb06df664 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
@@ -16,6 +16,7 @@ import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -1223,7 +1224,7 @@ public class DebugPlugin extends Plugin {
try{
DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
parser.setErrorHandler(new DefaultHandler());
- stream = new ByteArrayInputStream(document.getBytes("UTF8")); //$NON-NLS-1$
+ stream = new ByteArrayInputStream(document.getBytes(StandardCharsets.UTF_8));
root = parser.parse(stream).getDocumentElement();
} catch (ParserConfigurationException e) {
abort("Unable to parse XML document.", e); //$NON-NLS-1$
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
index fc732fd2c..11eed21d3 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfigurationWorkingCopy.java
@@ -310,9 +310,8 @@ public class LaunchConfigurationWorkingCopy extends LaunchConfiguration implemen
BufferedOutputStream stream = null;
try {
stream = new BufferedOutputStream(file.openOutputStream(EFS.NONE, null));
- stream.write(xml.getBytes("UTF8")); //$NON-NLS-1$
- }
- finally {
+ stream.write(xml.getBytes(StandardCharsets.UTF_8));
+ } finally {
if(stream != null) {
stream.close();
}

Back to the top