jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/dtdparser/XmlReader.java
--- a/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/dtdparser/XmlReader.java Wed Jul 05 20:57:41 2017 +0200
+++ b/jaxws/src/jdk.xml.bind/share/classes/com/sun/xml/internal/dtdparser/XmlReader.java Fri Oct 30 10:34:46 2015 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, 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
@@ -33,6 +33,7 @@
import java.io.PushbackInputStream;
import java.io.Reader;
import java.util.Hashtable;
+import java.util.Locale;
// NOTE: Add I18N support to this class when JDK gets the ability to
@@ -86,7 +87,7 @@
//
/**
- * Constructs the reader from an input stream, autodetecting
+ * Constructs the reader from an input stream, auto-detecting
* the encoding to use according to the heuristic specified
* in the XML 1.0 recommendation.
*
@@ -104,7 +105,7 @@
*
* @param in the input stream from which the reader is constructed
* @param encoding the IETF standard name of the encoding to use;
- * if null, autodetection is used.
+ * if null, auto-detection is used.
* @throws IOException on error, including unrecognized encoding
*/
public static Reader createReader(InputStream in, String encoding)
@@ -178,7 +179,7 @@
// returns an encoding name supported by JDK >= 1.1.6
// for some cases required by the XML spec
private static String std2java(String encoding) {
- String temp = encoding.toUpperCase();
+ String temp = encoding.toUpperCase(Locale.ENGLISH);
temp = (String) charsets.get(temp);
return temp != null ? temp : encoding;
}
@@ -321,7 +322,7 @@
// Next must be "l" (and whitespace) else we conclude
// error and choose UTF-8.
//
- if ((c = r.read()) != 'l') {
+ if ((r.read()) != 'l') {
setEncoding(pb, "UTF-8");
return;
}
@@ -758,6 +759,7 @@
super(in);
}
+ @Override
public int read(char buf [], int offset, int len) throws IOException {
int i;