Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java
index 6d2378821..9f6c704bd 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/EclipseDebugTrace.java
@@ -11,6 +11,7 @@
package org.eclipse.osgi.internal.debug;
import java.io.*;
+import java.nio.charset.StandardCharsets;
import java.security.AccessController;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
@@ -604,12 +605,7 @@ class EclipseDebugTrace implements DebugTrace {
* @return A Writer for the given OutputStream
*/
private Writer logForStream(OutputStream output) {
-
- try {
- return new BufferedWriter(new OutputStreamWriter(output, "UTF-8")); //$NON-NLS-1$
- } catch (UnsupportedEncodingException e) {
- return new BufferedWriter(new OutputStreamWriter(output));
- }
+ return new BufferedWriter(new OutputStreamWriter(output, StandardCharsets.UTF_8));
}
/**

Back to the top