changeset 2192:242ddf60d507

Merge jdk8u262-ga
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Fri, 04 Sep 2020 17:46:06 +0100
parents 83655c793753 (current diff) 63884b34cac1 (diff)
children ae372ac2562a
files .hgtags src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
diffstat 6 files changed, 34 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Aug 31 03:16:21 2020 +0100
+++ b/.hgtags	Fri Sep 04 17:46:06 2020 +0100
@@ -1108,3 +1108,12 @@
 883803235596eb78e84bbe1c4a603fec4950a3d0 icedtea-3.16.0
 883803235596eb78e84bbe1c4a603fec4950a3d0 icedtea-3.17.0pre00
 53bd98f3ee4681682873a98ef7f6eb2f80853ff8 icedtea-3.17.0pre01
+a3dcb5ebdf433b340419faf6698443a613415a79 jdk8u262-b01
+7fe6268fe8767ebe368cdc22081b8b4033fc8969 jdk8u262-b02
+560093f3167970da2935b745493653420fdea008 jdk8u262-b03
+d054aabd2e3c09de0ff622b4fab09388d30aee02 jdk8u262-b04
+976e73cfac410997160b1d3d6e14a88a324440c3 jdk8u262-b05
+ddbd856338439f2d5f742040d896e27f0f104cd1 jdk8u262-b06
+ebb0a284b7e75dfb741af3332eb87b37aca66875 jdk8u262-b07
+0cccb32a50471fd52ecf2f697d95e7254798ab26 jdk8u262-b08
+779db06fb02444e294b7c93fe3902afee615df2a jdk8u262-b09
--- a/THIRD_PARTY_README	Mon Aug 31 03:16:21 2020 +0100
+++ b/THIRD_PARTY_README	Fri Sep 04 17:46:06 2020 +0100
@@ -1643,7 +1643,7 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to GIFLIB 5.1.8 & libungif 4.1.3, 
+%% This notice is provided with respect to GIFLIB 5.2.1 & libungif 4.1.3, 
 which may be included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java	Mon Aug 31 03:16:21 2020 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java	Fri Sep 04 17:46:06 2020 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -71,6 +71,7 @@
  * @author Eric Ye, IBM
  *
  * @version $Id: XMLDTDScannerImpl.java,v 1.8 2010-11-01 04:39:41 joehw Exp $
+ * @LastModified: Feb 2020
  */
 public class XMLDTDScannerImpl
 extends XMLScanner
@@ -615,6 +616,7 @@
         if (fScannerState == SCANNER_STATE_END_OF_INPUT)
             return;
 
+        boolean dtdEntity = name.equals("[dtd]");
         // Handle end of PE
         boolean reportEntity = fReportEntity;
         if (name.startsWith("%")) {
@@ -623,8 +625,7 @@
             int startMarkUpDepth = popPEStack();
             // throw fatalError if this entity was incomplete and
             // was a freestanding decl
-            if(startMarkUpDepth == 0 &&
-            startMarkUpDepth < fMarkUpDepth) {
+            if (startMarkUpDepth == 0 && startMarkUpDepth < fMarkUpDepth) {
                 fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
                 "ILL_FORMED_PARAMETER_ENTITY_WHEN_USED_IN_DECL",
                 new Object[]{ fEntityManager.fCurrentEntity.name},
@@ -644,12 +645,10 @@
             if (fEntityScanner.isExternal()) {
                 fExtEntityDepth--;
             }
-        }
-
-        // call handler
-        boolean dtdEntity = name.equals("[dtd]");
-        if (fDTDHandler != null && !dtdEntity && reportEntity) {
-            fDTDHandler.endParameterEntity(name, null);
+            // call handler
+            if (fDTDHandler != null && reportEntity) {
+                fDTDHandler.endParameterEntity(name, null);
+            }
         }
 
         // end DTD
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java	Mon Aug 31 03:16:21 2020 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java	Fri Sep 04 17:46:06 2020 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -69,6 +69,7 @@
  * @author K.Venugopal SUN Microsystems
  * @author Sunitha Reddy, SUN Microsystems
  * @version $Id: XMLScanner.java,v 1.12 2010-11-01 04:39:41 joehw Exp $
+ * @LastModified: Feb 2020
  */
 public abstract class XMLScanner
         implements XMLComponent {
@@ -1240,10 +1241,10 @@
      * @throws XNIException Thrown by handler to signal an error.
      */
     public void endEntity(String name, Augmentations augs) throws IOException, XNIException {
-
         // keep track of the entity depth
-        fEntityDepth--;
-
+        if (fEntityDepth > 0) {
+            fEntityDepth--;
+        }
     } // endEntity(String)
 
     /**
--- a/src/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java	Mon Aug 31 03:16:21 2020 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java	Fri Sep 04 17:46:06 2020 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -61,6 +61,7 @@
  * @author Neil Graham, IBM
  *
  * @version $Id: DTDGrammar.java,v 1.4 2010/08/11 07:18:37 joehw Exp $
+ * @LastModified: Feb 2020
  */
 public class DTDGrammar
     implements XMLDTDHandler, XMLDTDContentModelHandler, EntityState, Grammar {
@@ -445,9 +446,12 @@
      * @throws XNIException Thrown by handler to signal an error.
      */
     public void endParameterEntity(String name, Augmentations augs) throws XNIException {
-
-        fPEDepth--;
-        fReadingExternalDTD = fPEntityStack[fPEDepth];
+        // redundant check as this method can only be called after parsing a PE
+        // incomplete or truncated DTD get caught before reaching this method
+        if (fPEDepth > 0) {
+            fPEDepth--;
+            fReadingExternalDTD = fPEntityStack[fPEDepth];
+        }
 
     } // endParameterEntity(String,Augmentations)
 
--- a/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java	Mon Aug 31 03:16:21 2020 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java	Fri Sep 04 17:46:06 2020 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -106,6 +106,7 @@
  * @author Andy Clark IBM
  * @author Neeraj Bajaj, Sun Microsystems, inc.
  * @version $Id: XMLSchemaValidator.java,v 1.16 2010-11-01 04:39:55 joehw Exp $
+ * @LastModified: Apr 2020
  */
 public class XMLSchemaValidator
     implements XMLComponent, XMLDocumentFilter, FieldActivator, RevalidationHandler {
@@ -1727,7 +1728,7 @@
 
         // root element
         if (fElementDepth == -1 && fValidationManager.isGrammarFound()) {
-            if (fSchemaType == null) {
+            if (fSchemaType == null && !fUseGrammarPoolOnly) {
                 // schemaType is not specified
                 // if a DTD grammar is found, we do the same thing as Dynamic:
                 // if a schema grammar is found, validation is performed;