diff options
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/AliasMapper.java')
-rw-r--r-- | bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/AliasMapper.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/AliasMapper.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/AliasMapper.java index b6fd06b3c..f005e47fb 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/AliasMapper.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/AliasMapper.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2016 IBM Corporation and others. + * Copyright (c) 2003, 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.osgi.internal.framework; import java.io.*; +import java.nio.charset.StandardCharsets; import java.util.*; import java.util.Map.Entry; import org.eclipse.osgi.internal.debug.Debug; @@ -99,12 +100,7 @@ public class AliasMapper { */ private static Map<String, Collection<String>> initAliases(InputStream in, Map<String, Collection<String>> aliasTable, Map<String, String> canonicalTable) { try { - BufferedReader br; - try { - br = new BufferedReader(new InputStreamReader(in, "UTF8")); //$NON-NLS-1$ - } catch (UnsupportedEncodingException e) { - br = new BufferedReader(new InputStreamReader(in)); - } + BufferedReader br = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8)); Map<String, Set<String>> multiMaster = new HashMap<>(); while (true) { String line = br.readLine(); |