aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.hgtags24
-rw-r--r--LICENSE6
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java9
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java49
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java14
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java17
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java43
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java14
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties1
-rw-r--r--src/com/sun/org/apache/xerces/internal/util/HTTPInputSource.java24
20 files changed, 130 insertions, 81 deletions
diff --git a/.hgtags b/.hgtags
index d44542b..1e3f221 100644
--- a/.hgtags
+++ b/.hgtags
@@ -638,3 +638,27 @@ ff603463199f8a2140cb97fd3ff98046dfeecb3f jdk8u102-b31
58dea534c1d49731a40de645cfa3450949f31d26 jdk8u102-b32
d31aad84c2727e40792cba85073713424b6b209f jdk8u102-b33
6d28aaf99e9383e968654867e9fd2195046f33f4 jdk8u102-b34
+a6a032a5490f4000bdfb25a2f604b22bcdf95ecf jdk8u111-b00
+4389b3cda88c98df36b36116999c4591a9b8e12c jdk8u111-b01
+1ffc284c45e0fb86c066b832d7be50766b68eb25 jdk8u111-b02
+f518fa45f0f04dbadd026a390254b57169a0c8ab jdk8u111-b03
+4daccb30c04496252bf7d43de8e2ee0471e4319f jdk8u111-b04
+9bbba018c96a17c5b5583e26a38d3c1e910178ef jdk8u111-b05
+bd3773524c2de38524496097d7d8bc2c1cc39e96 jdk8u111-b06
+9c8856c6b82e4b9773896322146c3b1d6d12a6ec jdk8u111-b07
+76e3e209e51c17546b484b0ac95e77cbb949e4cf jdk8u111-b08
+c4301c045c79b8984346d705999d08475792418b jdk8u111-b09
+ea4555b9d9130771e228fdf0f33b783bcbc3172c jdk8u111-b10
+d80acd543dcb4ddb011dec05da364727da907ec2 jdk8u111-b11
+4e861d8430460a72ee3e5c79a85e772b06684adc jdk8u112-b00
+664dd77016540cb9cee7b1bfa27a0a6970f7cf1f jdk8u112-b01
+80ce57123e23ff53f19c034ea5892b186730ddf3 jdk8u112-b02
+fa8960424b5baf4aa0c1e0172115e85317f04127 jdk8u112-b03
+cfc0c92fdbac159ab3434b96d650324cf6dc91dd jdk8u112-b04
+e677228a078a680d8761b3fd22938effe9f7e18d jdk8u112-b06
+7ebdc1fa55fa3f0c21cc009bf1bb8cfd39a92099 jdk8u112-b07
+6ee652d363bb2e0a9f7f0ea7d0d8f4de727aec7c jdk8u112-b08
+45d7c35417517939a600614f0dd0cb16a3098937 jdk8u112-b09
+17cfa0cd7c3c621236f4dd891f8808c3a03c3542 jdk8u112-b10
+ed365ea4cf5fb4d9407e9484f0cb5cd2e2c7786c jdk8u112-b11
+382516531501b0136ae56e9bccc6d09de805ce39 jdk8u112-b12
diff --git a/LICENSE b/LICENSE
index b40a0f4..8b400c7 100644
--- a/LICENSE
+++ b/LICENSE
@@ -3,7 +3,7 @@ The GNU General Public License (GPL)
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
@@ -287,8 +287,8 @@ pointer to where the full notice is found.
more details.
You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc., 59
- Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java b/src/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java
index ac26f80..e29d296 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XML11EntityScanner.java
@@ -752,7 +752,7 @@ public class XML11EntityScanner
load(0, true, true);
}
else if (fCurrentEntity.position == fCurrentEntity.count - 1) {
- invokeListeners(0);
+ invokeListeners(1);
fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1];
load(1, false, false);
fCurrentEntity.position = 0;
@@ -904,7 +904,7 @@ public class XML11EntityScanner
load(0, true, true);
}
else if (fCurrentEntity.position == fCurrentEntity.count - 1) {
- invokeListeners(0);
+ invokeListeners(1);
fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1];
load(1, false, false);
fCurrentEntity.startPosition = 0;
@@ -1352,7 +1352,7 @@ public class XML11EntityScanner
fCurrentEntity.lineNumber++;
fCurrentEntity.columnNumber = 1;
if (fCurrentEntity.position == fCurrentEntity.count - 1) {
- invokeListeners(0);
+ invokeListeners(1);
fCurrentEntity.ch[0] = (char)c;
entityChanged = load(1, true, false);
if (!entityChanged) {
@@ -1406,8 +1406,9 @@ public class XML11EntityScanner
fCurrentEntity.lineNumber++;
fCurrentEntity.columnNumber = 1;
if (fCurrentEntity.position == fCurrentEntity.count - 1) {
+ invokeListeners(1);
fCurrentEntity.ch[0] = (char)c;
- entityChanged = load(1, true, true);
+ entityChanged = load(1, true, false);
if (!entityChanged) {
// the load change the position to be 1,
// need to restore it when entity not changed
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java b/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java
index 135eb5e..d63df64 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java
@@ -3,11 +3,13 @@
*/
/*
- * Copyright 2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -19,17 +21,19 @@
*/
package com.sun.org.apache.xerces.internal.impl;
-import com.sun.xml.internal.stream.dtd.nonvalidating.DTDGrammar;
-import java.io.EOFException;
-import java.io.IOException;
+import com.sun.org.apache.xerces.internal.impl.Constants;
import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter;
+import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter;
+import com.sun.org.apache.xerces.internal.impl.XMLEntityHandler;
import com.sun.org.apache.xerces.internal.util.SymbolTable;
import com.sun.org.apache.xerces.internal.util.XMLAttributesImpl;
import com.sun.org.apache.xerces.internal.util.XMLChar;
import com.sun.org.apache.xerces.internal.util.XMLStringBuffer;
+import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer;
+import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
import com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler;
import com.sun.org.apache.xerces.internal.xni.XMLDTDHandler;
import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier;
@@ -41,8 +45,9 @@ import com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException;
import com.sun.org.apache.xerces.internal.xni.parser.XMLDTDScanner;
import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
import com.sun.org.apache.xerces.internal.xni.Augmentations;
-import com.sun.org.apache.xerces.internal.utils.XMLLimitAnalyzer;
-import com.sun.org.apache.xerces.internal.utils.XMLSecurityManager;
+import com.sun.xml.internal.stream.dtd.nonvalidating.DTDGrammar;
+import java.io.EOFException;
+import java.io.IOException;
/**
* This class is responsible for scanning the declarations found
@@ -386,15 +391,25 @@ implements XMLDTDScanner, XMLComponent, XMLEntityHandler {
*/
@Override
public boolean skipDTD(boolean supportDTD) throws IOException {
- if (!supportDTD) {
- fStringBuffer.clear();
- if (!fEntityScanner.scanData("]", fStringBuffer)) {
- fEntityScanner.fCurrentEntity.position--;
+ if (supportDTD)
+ return false;
+
+ fStringBuffer.clear();
+ while (fEntityScanner.scanData("]", fStringBuffer)) {
+ int c = fEntityScanner.peekChar();
+ if (c != -1) {
+ if (XMLChar.isHighSurrogate(c)) {
+ scanSurrogates(fStringBuffer);
+ }
+ if (isInvalidLiteral(c)) {
+ reportFatalError("InvalidCharInDTD",
+ new Object[] { Integer.toHexString(c) });
+ fEntityScanner.scanChar(null);
+ }
}
-
- return true;
}
- return false;
+ fEntityScanner.fCurrentEntity.position--;
+ return true;
}
//
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java
index ef118f0..6d197c5 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java
@@ -3,13 +3,14 @@
*/
/*
- * Copyright 2005 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,7 +19,6 @@
* limitations under the License.
*/
-
package com.sun.org.apache.xerces.internal.impl;
import com.sun.org.apache.xerces.internal.impl.msg.XMLMessageFormatter;
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java
index 4330492..6c62345 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java
@@ -3,13 +3,14 @@
*/
/*
- * Copyright 2005 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,7 +21,6 @@
package com.sun.org.apache.xerces.internal.impl;
-
import com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDDescription;
import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager;
import com.sun.org.apache.xerces.internal.util.NamespaceSupport;
@@ -1107,8 +1107,7 @@ public class XMLDocumentScannerImpl
if (!moreToScan) {
// end doctype declaration
if (!fEntityScanner.skipChar(']', null)) {
- reportFatalError("EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET",
- null);
+ reportFatalError("DoctypedeclNotClosed", new Object[]{fDoctypeName});
}
fEntityScanner.skipSpaces();
if (!fEntityScanner.skipChar('>', null)) {
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java
index 8b02b2e..ff02bba 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java
@@ -44,8 +44,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
+import java.util.ArrayList;
import java.util.Locale;
-import java.util.Vector;
/**
* Implements the entity scanner methods.
@@ -58,11 +58,10 @@ import java.util.Vector;
*/
public class XMLEntityScanner implements XMLLocator {
-
- protected Entity.ScannedEntity fCurrentEntity = null ;
+ protected Entity.ScannedEntity fCurrentEntity = null;
protected int fBufferSize = XMLEntityManager.DEFAULT_BUFFER_SIZE;
- protected XMLEntityManager fEntityManager ;
+ protected XMLEntityManager fEntityManager;
/** Security manager. */
protected XMLSecurityManager fSecurityManager = null;
@@ -72,8 +71,9 @@ public class XMLEntityScanner implements XMLLocator {
/** Debug switching readers for encodings. */
private static final boolean DEBUG_ENCODINGS = false;
+
/** Listeners which should know when load is being called */
- private Vector listeners = new Vector();
+ private ArrayList<XMLBufferListener> listeners = new ArrayList<>();
private static final boolean [] VALID_NAMES = new boolean[127];
@@ -140,9 +140,10 @@ public class XMLEntityScanner implements XMLLocator {
VALID_NAMES[58]=true;
VALID_NAMES[95]=true;
}
- // SAPJVM: Remember, that the XML version has explicitly been set,
+
+ // Remember, that the XML version has explicitly been set,
// so that XMLStreamReader.getVersion() can find that out.
- boolean xmlVersionSetExplicitly = false;
+ protected boolean xmlVersionSetExplicitly = false;
// indicates that the operation is for detecting XML version
boolean detectingVersion = false;
@@ -261,7 +262,7 @@ public class XMLEntityScanner implements XMLLocator {
* @param xmlVersion the XML version of the current entity
*/
public final void setXMLVersion(String xmlVersion) {
- xmlVersionSetExplicitly = true; // SAPJVM
+ xmlVersionSetExplicitly = true;
fCurrentEntity.xmlVersion = xmlVersion;
} // setXMLVersion(String)
@@ -553,8 +554,7 @@ public class XMLEntityScanner implements XMLLocator {
// scan character
int offset = fCurrentEntity.position;
int c = fCurrentEntity.ch[fCurrentEntity.position++];
- if (c == '\n' ||
- (c == '\r' && isExternal)) {
+ if (c == '\n' || (c == '\r' && isExternal)) {
fCurrentEntity.lineNumber++;
fCurrentEntity.columnNumber = 1;
if (fCurrentEntity.position == fCurrentEntity.count) {
@@ -1027,7 +1027,7 @@ public class XMLEntityScanner implements XMLLocator {
if (fCurrentEntity.position == fCurrentEntity.count) {
load(0, true, true);
} else if (fCurrentEntity.position == fCurrentEntity.count - 1) {
- invokeListeners(0);
+ invokeListeners(1);
fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1];
load(1, false, false);
fCurrentEntity.position = 0;
@@ -1186,7 +1186,7 @@ public class XMLEntityScanner implements XMLLocator {
if (fCurrentEntity.position == fCurrentEntity.count) {
load(0, true, true);
} else if (fCurrentEntity.position == fCurrentEntity.count - 1) {
- invokeListeners(0);
+ invokeListeners(1);
fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1];
load(1, false, false);
fCurrentEntity.position = 0;
@@ -1339,8 +1339,8 @@ public class XMLEntityScanner implements XMLLocator {
* <p>
* <strong>Note:</strong> The characters are consumed.
* <p>
- * <strong>Note:</strong> This assumes that the length of the delimiter
- * and that the delimiter contains at least one character.
+ * <strong>Note:</strong> This assumes that the delimiter contains at
+ * least one character.
* <p>
* <strong>Note:</strong> This method does not guarantee to return
* the longest run of character data. This method may return before
@@ -1523,7 +1523,7 @@ public class XMLEntityScanner implements XMLLocator {
} while (!done);
return !done;
- } // scanData(String,XMLString)
+ } // scanData(String, XMLStringBuffer)
/**
* Skips a character appearing immediately on the input.
@@ -1650,7 +1650,7 @@ public class XMLEntityScanner implements XMLLocator {
fCurrentEntity.lineNumber++;
fCurrentEntity.columnNumber = 1;
if (fCurrentEntity.position == fCurrentEntity.count - 1) {
- invokeListeners(0);
+ invokeListeners(1);
fCurrentEntity.ch[0] = (char)c;
entityChanged = load(1, true, false);
if (!entityChanged){
@@ -1827,8 +1827,7 @@ public class XMLEntityScanner implements XMLLocator {
final int length = s.length;
//first make sure that required capacity is avaible
if(arrangeCapacity(length, false)){
- int beforeSkip = fCurrentEntity.position ;
- int afterSkip = fCurrentEntity.position + length ;
+ int beforeSkip = fCurrentEntity.position;
if(DEBUG_SKIP_STRING){
System.out.println("skipString,length = " + new String(s) + "," + length);
@@ -2210,8 +2209,9 @@ public class XMLEntityScanner implements XMLLocator {
* is being changed.
*/
public void registerListener(XMLBufferListener listener) {
- if(!listeners.contains(listener))
+ if (!listeners.contains(listener)) {
listeners.add(listener);
+ }
}
/**
@@ -2219,9 +2219,8 @@ public class XMLEntityScanner implements XMLLocator {
* @param loadPos Starting position from which new data is being loaded into scanner buffer.
*/
public void invokeListeners(int loadPos){
- for(int i=0;i<listeners.size();i++){
- XMLBufferListener listener =(XMLBufferListener) listeners.get(i);
- listener.refresh(loadPos);
+ for (int i=0; i<listeners.size(); i++) {
+ listeners.get(i).refresh(loadPos);
}
}
diff --git a/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java b/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
index 7645cce..fb12b42 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
@@ -3,13 +3,14 @@
*/
/*
- * Copyright 2005 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,7 +21,6 @@
package com.sun.org.apache.xerces.internal.impl;
-
import com.sun.org.apache.xerces.internal.util.Status;
import com.sun.xml.internal.stream.XMLEntityStorage;
import java.io.IOException;
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties
index c7a23c2..01531f7 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = White space is required after \"<!DOCTYPE\" in the document type declaration.
MSG_ROOT_ELEMENT_TYPE_REQUIRED = The root element type must appear after \"<!DOCTYPE\" in the document type declaration.
DoctypedeclUnterminated = The document type declaration for root element type \"{0}\" must end with ''>''.
+ DoctypedeclNotClosed = The document type declaration for root element type \"{0}\" must be closed with '']''.
PEReferenceWithinMarkup = The parameter entity reference \"%{0};\" cannot occur within markup in the internal subset of the DTD.
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = The markup declarations contained or pointed to by the document type declaration must be well-formed.
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties
index 91ff0dc..0848270 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Leerstelle nach "<!DOCTYPE" in der Dokumenttypdeklaration erforderlich.
MSG_ROOT_ELEMENT_TYPE_REQUIRED = Root-Elementtyp muss nach "<!DOCTYPE" in der Dokumenttypdeklaration enthalten sein.
DoctypedeclUnterminated = Dokumenttypdeklaration f\u00FCr Root-Elementtyp "{0}" muss mit ">" enden.
+ DoctypedeclNotClosed = Dokumenttypdeklaration f\u00FCr Root-Elementtyp "{0}" muss mit '']'' enden.
PEReferenceWithinMarkup = Parameterentityreferenz "%{0};" darf nicht in Markup in der internen Teilmenge der DTD vorkommen.
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Die Markup-Deklarationen, die in der Dokumenttypdeklaration enthalten sind bzw. auf die von der Dokumenttypdeklaration verwiesen wird, m\u00FCssen ordnungsgem\u00E4\u00DF formatiert sein.
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties
index 9c4d5b0..108eeeb 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_es.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Es necesario un espacio en blanco despu\u00E9s de "<!DOCTYPE" en la declaraci\u00F3n de tipo de documento.
MSG_ROOT_ELEMENT_TYPE_REQUIRED = El tipo de elemento ra\u00EDz debe aparecer despu\u00E9s de "<!DOCTYPE" en la declaraci\u00F3n de tipo de documento.
DoctypedeclUnterminated = La declaraci\u00F3n de tipo de documento para el tipo de elemento ra\u00EDz "{0}" debe finalizar en ''>''.
+ DoctypedeclNotClosed = La declaraci\u00F3n de tipo de documento para el tipo de elemento ra\u00EDz "{0}" debe finalizar en '']''.
PEReferenceWithinMarkup = La referencia de entidad del par\u00E1metro "%{0};" no puede producirse en el marcador en el subconjunto interno del DTD.
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Las declaraciones de marcador que se incluyen o a las que apunta la declaraci\u00F3n de tipo de documento deben tener el formato correcto.
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties
index 300ff03..c9c31bb 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_fr.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Un espace est obligatoire apr\u00E8s "<!DOCTYPE" dans la d\u00E9claration de type de document.
MSG_ROOT_ELEMENT_TYPE_REQUIRED = Le type d'\u00E9l\u00E9ment racine doit figurer apr\u00E8s "<!DOCTYPE" dans la d\u00E9claration de type de document.
DoctypedeclUnterminated = La d\u00E9claration de type de document pour le type d''\u00E9l\u00E9ment racine "{0}" doit se terminer par ''>''.
+ DoctypedeclNotClosed = La d\u00E9claration de type de document pour le type d''\u00E9l\u00E9ment racine "{0}" doit se terminer par '']''.
PEReferenceWithinMarkup = La r\u00E9f\u00E9rence d''entit\u00E9 de param\u00E8tre "%{0};" ne peut pas survenir dans le balisage du sous-ensemble interne de la DTD.
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Les d\u00E9clarations de balisage contenues dans la d\u00E9claration de type de document ou sur lesquelles pointe cette derni\u00E8re doivent avoir un format correct.
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties
index fbb95d3..1cca604 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_it.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u00C8 richiesto uno spazio dopo "<!DOCTYPE" nella dichiarazione del tipo di documento.
MSG_ROOT_ELEMENT_TYPE_REQUIRED = Il tipo di elemento radice deve comparire dopo "<!DOCTYPE" nella dichiarazione del tipo di documento.
DoctypedeclUnterminated = La dichiarazione del tipo di documento per il tipo di elemento radice "{0}" deve terminare con ''>''.
+ DoctypedeclNotClosed = La dichiarazione del tipo di documento per il tipo di elemento radice "{0}" deve terminare con '']''.
PEReferenceWithinMarkup = Il riferimento di entit\u00E0 di parametro "%{0};" non pu\u00F2 essere presente nel markup del set secondario interno del DTD.
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Le dichiarazioni di markup contenute o indicate dalla dichiarazione del tipo di documento devono avere un formato corretto.
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties
index e656dd8..74e0594 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ja.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001"<!DOCTYPE"\u306E\u5F8C\u306B\u7A7A\u767D\u304C\u5FC5\u8981\u3067\u3059\u3002
MSG_ROOT_ELEMENT_TYPE_REQUIRED = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u3067\u306F\u3001"<!DOCTYPE"\u306E\u5F8C\u306B\u30EB\u30FC\u30C8\u8981\u7D20\u30BF\u30A4\u30D7\u304C\u5FC5\u8981\u3067\u3059\u3002
DoctypedeclUnterminated = \u30EB\u30FC\u30C8\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u306F''>''\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+ DoctypedeclNotClosed = \u30EB\u30FC\u30C8\u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u306F'']''\u3067\u9589\u3058\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
PEReferenceWithinMarkup = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u53C2\u7167"%{0};"\u306F\u3001DTD\u306E\u5185\u90E8\u30B5\u30D6\u30BB\u30C3\u30C8\u306E\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u5185\u306B\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u306B\u542B\u307E\u308C\u308B\u304B\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30BF\u30A4\u30D7\u5BA3\u8A00\u304C\u6307\u3057\u3066\u3044\u308B\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u5BA3\u8A00\u306F\u6574\u5F62\u5F0F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties
index 099855e..e90be33 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_ko.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 "<!DOCTYPE" \uB2E4\uC74C\uC5D0 \uACF5\uBC31\uC774 \uD544\uC694\uD569\uB2C8\uB2E4.
MSG_ROOT_ELEMENT_TYPE_REQUIRED = \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC5D0\uC11C\uB294 "<!DOCTYPE" \uB2E4\uC74C\uC5D0 \uB8E8\uD2B8 \uC694\uC18C \uC720\uD615\uC774 \uB098\uD0C0\uB098\uC57C \uD569\uB2C8\uB2E4.
DoctypedeclUnterminated = \uB8E8\uD2B8 \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC740 ''>''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
+ DoctypedeclNotClosed = \uB8E8\uD2B8 \uC694\uC18C \uC720\uD615 "{0}"\uC5D0 \uB300\uD55C \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC740 '']''\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4.
PEReferenceWithinMarkup = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 "%{0};"\uC740 DTD\uC758 \uB0B4\uBD80 \uBD80\uBD84 \uC9D1\uD569\uC5D0 \uC788\uB294 \uB9C8\uD06C\uC5C5 \uC548\uC5D0 \uD45C\uC2DC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC744 \uD3EC\uD568\uD558\uAC70\uB098 \uBB38\uC11C \uC720\uD615 \uC120\uC5B8\uC774 \uAC00\uB9AC\uD0A4\uB294 \uB9C8\uD06C\uC5C5 \uC120\uC5B8\uC740 \uC62C\uBC14\uB978 \uD615\uC2DD\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4.
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties
index 1e00587..93ae48e 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_pt_BR.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = O espa\u00E7o em branco \u00E9 necess\u00E1rio ap\u00F3s "<!DOCTYPE" na declara\u00E7\u00E3o do tipo de documento.
MSG_ROOT_ELEMENT_TYPE_REQUIRED = O tipo de elemento-raiz deve aparecer ap\u00F3s "<!DOCTYPE" na declara\u00E7\u00E3o do tipo de documento.
DoctypedeclUnterminated = A declara\u00E7\u00E3o do tipo de documento do tipo de elemento "{0}" deve terminar com ''>''.
+ DoctypedeclNotClosed = A declara\u00E7\u00E3o do tipo de documento do tipo de elemento "{0}" deve terminar com '']''.
PEReferenceWithinMarkup = A refer\u00EAncia da entidade do par\u00E2metro "%{0};" n\u00E3o pode ocorrer na marca\u00E7\u00E3o no subconjunto interno do DTD.
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = As declara\u00E7\u00F5es de marca\u00E7\u00E3o contidas ou apontadas pela declara\u00E7\u00E3o do tipo de documento devem estar corretas.
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties
index add473e..4f54e5f 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_sv.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = Tomt utrymme kr\u00E4vs efter "<!DOCTYPE" i dokumenttypdeklarationen.
MSG_ROOT_ELEMENT_TYPE_REQUIRED = Rotelementtyp m\u00E5ste anges efter "<!DOCTYPE" i dokumenttypdeklarationen.
DoctypedeclUnterminated = Dokumenttypdeklarationen f\u00F6r rotelementtyp "{0}" m\u00E5ste avslutas med ''>''.
+ DoctypedeclNotClosed = Dokumenttypsdeklarationen f\u00F6r rotelementtypen "{0}" m\u00E5ste st\u00E4ngas med '']''.
PEReferenceWithinMarkup = Parameterreferensen "%{0};" f\u00E5r inte f\u00F6rekomma i kodtexten i den interna delm\u00E4ngden i DTD.
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = Kodtextdeklarationerna som finns med eller pekas till fr\u00E5n dokumenttypdeklarationen m\u00E5ste vara v\u00E4lformulerade.
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties
index dc6bca0..dc2e1d0 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_CN.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u5728\u6587\u6863\u7C7B\u578B\u58F0\u660E\u4E2D\u7684 "<!DOCTYPE" \u540E\u9762\u9700\u8981\u6709\u7A7A\u683C\u3002
MSG_ROOT_ELEMENT_TYPE_REQUIRED = \u5728\u6587\u6863\u7C7B\u578B\u58F0\u660E\u4E2D, \u6839\u5143\u7D20\u7C7B\u578B\u5FC5\u987B\u51FA\u73B0\u5728 "<!DOCTYPE" \u540E\u9762\u3002
DoctypedeclUnterminated = \u6839\u5143\u7D20\u7C7B\u578B "{0}" \u7684\u6587\u6863\u7C7B\u578B\u58F0\u660E\u5FC5\u987B\u4EE5 ''>'' \u7ED3\u5C3E\u3002
+ DoctypedeclNotClosed = \u6839\u5143\u7D20\u7C7B\u578B "{0}" \u7684\u6587\u6863\u7C7B\u578B\u58F0\u660E\u5FC5\u987B\u4EE5 '']'' \u7ED3\u5C3E\u3002
PEReferenceWithinMarkup = \u53C2\u6570\u5B9E\u4F53\u5F15\u7528 "%{0};" \u4E0D\u80FD\u51FA\u73B0\u5728 DTD \u7684\u5185\u90E8\u5B50\u96C6\u4E2D\u7684\u6807\u8BB0\u5185\u3002
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \u6587\u6863\u7C7B\u578B\u58F0\u660E\u5305\u542B\u6216\u6307\u5411\u7684\u6807\u8BB0\u58F0\u660E\u5FC5\u987B\u683C\u5F0F\u6B63\u786E\u3002
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties
index 9d22569..80e01f2 100644
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_zh_TW.properties
@@ -145,6 +145,7 @@
MSG_SPACE_REQUIRED_BEFORE_ROOT_ELEMENT_TYPE_IN_DOCTYPEDECL = \u5728\u6587\u4EF6\u985E\u578B\u5BA3\u544A\u4E2D "<!DOCTYPE" \u4E4B\u5F8C\u9700\u8981\u7A7A\u683C\u3002
MSG_ROOT_ELEMENT_TYPE_REQUIRED = \u5728\u6587\u4EF6\u985E\u578B\u5BA3\u544A\u4E2D\uFF0C\u6839\u5143\u7D20\u985E\u578B\u5FC5\u9808\u51FA\u73FE\u5728 "<!DOCTYPE" \u4E4B\u5F8C\u3002
DoctypedeclUnterminated = \u6839\u5143\u7D20\u985E\u578B "{0}" \u7684\u6587\u4EF6\u985E\u578B\u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u70BA ''>''\u3002
+ DoctypedeclNotClosed = \u6839\u5143\u7D20\u985E\u578B "{0}" \u7684\u6587\u4EF6\u985E\u578B\u5BA3\u544A\u7D50\u5C3E\u5FC5\u9808\u70BA '']''\u3002
PEReferenceWithinMarkup = DTD \u5167\u90E8\u5B57\u96C6\u7684\u6A19\u8A18\u5167\u4E0D\u80FD\u51FA\u73FE\u53C3\u6578\u5BE6\u9AD4\u53C3\u7167 "%{0};"\u3002
MSG_MARKUP_NOT_RECOGNIZED_IN_DTD = \u6587\u4EF6\u985E\u578B\u5BA3\u544A\u5305\u542B\u6216\u6307\u5411\u7684\u6A19\u8A18\u5BA3\u544A\u5FC5\u9808\u683C\u5F0F\u6B63\u78BA\u3002
# 2.10 White Space Handling
diff --git a/src/com/sun/org/apache/xerces/internal/util/HTTPInputSource.java b/src/com/sun/org/apache/xerces/internal/util/HTTPInputSource.java
index bdd0750..c9bbed9 100644
--- a/src/com/sun/org/apache/xerces/internal/util/HTTPInputSource.java
+++ b/src/com/sun/org/apache/xerces/internal/util/HTTPInputSource.java
@@ -1,15 +1,16 @@
/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
*/
+
/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,18 +18,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.sun.org.apache.xerces.internal.util;
+import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier;
+import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
import java.io.InputStream;
import java.io.Reader;
-
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier;
-import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
-
/**
* This class represents an input source for an XML resource
* retrievable over HTTP. In addition to the properties