< prev index next >

src/java.xml.bind/share/classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 27,36 **** --- 27,37 ---- import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; + import java.nio.charset.StandardCharsets; import java.util.logging.Level; import java.util.logging.Logger; class FactoryFinder {
*** 68,82 **** } String factoryClassName; BufferedReader rd = null; try { ! try { ! rd = new BufferedReader(new InputStreamReader(is, "UTF-8")); ! } catch (java.io.UnsupportedEncodingException e) { ! rd = new BufferedReader(new InputStreamReader(is)); ! } try { factoryClassName = rd.readLine(); } catch (IOException x) { return null; } --- 69,79 ---- } String factoryClassName; BufferedReader rd = null; try { ! rd = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8)); try { factoryClassName = rd.readLine(); } catch (IOException x) { return null; }
< prev index next >