changeset 1399:b24121efd081 icedtea-2.7.0pre12

Merge jdk7u141-b02
author andrew
date Fri, 14 Jul 2017 00:56:15 +0100
parents 38a84a27f273 (current diff) b4b91a7beb18 (diff)
children 03c6bf5e7a4d
files .hgtags src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java src/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java src/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties
diffstat 10 files changed, 53 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Apr 27 03:09:52 2017 +0100
+++ b/.hgtags	Fri Jul 14 00:56:15 2017 +0100
@@ -663,3 +663,5 @@
 51ed13d07beb90ff71d8625d9d6409cc4add5cbc jdk7u131-b00
 30630c7ce6bb6776d89572190c3bd6b272370c49 icedtea-2.7.0pre10
 3d21a63343ab09e5106cd47913ea1591a9f5d78f icedtea-2.7.0pre11
+f347b141975453f642ae1140a45aa7c6127551dd jdk7u141-b00
+e096a279a1c226d7d3a4aa19d5beeba1fb0507cf jdk7u141-b01
--- a/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java	Thu Apr 27 03:09:52 2017 +0100
+++ b/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java	Fri Jul 14 00:56:15 2017 +0100
@@ -1016,7 +1016,7 @@
      "Propriet\u00E0 di sistema org.xml.sax.parser non specificata"},
 
     { ER_PARSER_ARG_CANNOT_BE_NULL,
-     "L''argomento del parser non deve essere nullo"},
+     "L'argomento del parser non deve essere nullo"},
 
     { ER_FEATURE,
      "Funzione: {0}"},
--- a/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java	Thu Apr 27 03:09:52 2017 +0100
+++ b/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java	Fri Jul 14 00:56:15 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -31,6 +31,7 @@
 import com.sun.org.apache.bcel.internal.generic.GETSTATIC;
 import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
 import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
+import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
 import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
 import com.sun.org.apache.bcel.internal.generic.ISTORE;
 import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
@@ -1252,6 +1253,10 @@
                                 classGen.getConstantPool());
         transf.addException("com.sun.org.apache.xalan.internal.xsltc.TransletException");
 
+        // call resetPrefixIndex at the beginning of transform
+        final int check = cpg.addMethodref(BASIS_LIBRARY_CLASS, "resetPrefixIndex", "()V");
+        il.append(new INVOKESTATIC(check));
+
         // Define and initialize current with the root node
         final LocalVariableGen current =
             transf.addLocalVariable("current",
--- a/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java	Thu Apr 27 03:09:52 2017 +0100
+++ b/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java	Fri Jul 14 00:56:15 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -48,6 +48,7 @@
 import java.text.NumberFormat;
 import java.util.Locale;
 import java.util.ResourceBundle;
+import java.util.concurrent.atomic.AtomicInteger;
 import javax.xml.transform.dom.DOMSource;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
@@ -1530,16 +1531,25 @@
     }
 
     /**
-     * This function is used in the execution of xsl:element
+     * These functions are used in the execution of xsl:element to generate
+     * and reset namespace prefix index local to current transformation process
      */
-    private static int prefixIndex = 0;
-
     public static String generatePrefix() {
-        synchronized (BasisLibrary.class) {
-            return ("ns" + prefixIndex++);
-        }
+        return ("ns" + threadLocalPrefixIndex.get().getAndIncrement());
+    }
+
+    public static void resetPrefixIndex() {
+        threadLocalPrefixIndex.get().set(0);
     }
 
+    private static final ThreadLocal<AtomicInteger> threadLocalPrefixIndex =
+        new ThreadLocal<AtomicInteger>() {
+            @Override
+            protected AtomicInteger initialValue() {
+                return new AtomicInteger();
+            }
+        };
+
     public static final String RUN_TIME_INTERNAL_ERR =
                                            "RUN_TIME_INTERNAL_ERR";
     public static final String RUN_TIME_COPY_ERR =
--- a/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java	Thu Apr 27 03:09:52 2017 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java	Fri Jul 14 00:56:15 2017 +0100
@@ -1,13 +1,14 @@
 /*
- * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
- * 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
  *
@@ -136,7 +137,7 @@
         if (DEBUG_START_END_ELEMENT)
             System.out.println(">>> scanStartElementNS()");
                 // Note: namespace processing is on by default
-        fEntityScanner.scanQName(fElementQName, NameType.ATTRIBUTE);
+        fEntityScanner.scanQName(fElementQName, NameType.ELEMENTSTART);
         // REVISIT - [Q] Why do we need this local variable? -- mrglavas
         String rawname = fElementQName.rawname;
         if (fBindNamespaces) {
@@ -346,7 +347,7 @@
     protected void scanStartElementName ()
         throws IOException, XNIException {
         // Note: namespace processing is on by default
-        fEntityScanner.scanQName(fElementQName, NameType.ATTRIBUTE);
+        fEntityScanner.scanQName(fElementQName, NameType.ELEMENTSTART);
         // Must skip spaces here because the DTD scanner
         // would consume them at the end of the external subset.
         fSawSpace = fEntityScanner.skipSpaces();
@@ -572,7 +573,7 @@
             System.out.println(">>> scanAttribute()");
 
         // name
-        fEntityScanner.scanQName(fAttributeQName, NameType.ATTRIBUTE);
+        fEntityScanner.scanQName(fAttributeQName, NameType.ATTRIBUTENAME);
 
         // equals
         fEntityScanner.skipSpaces();
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java	Thu Apr 27 03:09:52 2017 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java	Fri Jul 14 00:56:15 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -1208,7 +1208,7 @@
 
         // definitions
         while (!fEntityScanner.skipChar('>', null)) {
-            String name = fEntityScanner.scanName(NameType.ATTRIBUTE);
+            String name = fEntityScanner.scanName(NameType.ATTRIBUTENAME);
             if (name == null) {
                 reportFatalError("AttNameRequiredInAttDef",
                 new Object[]{elName});
@@ -1352,7 +1352,7 @@
             fMarkUpDepth++;
             do {
                 skipSeparator(false, !scanningInternalSubset());
-                String aName = fEntityScanner.scanName(NameType.ATTRIBUTE);
+                String aName = fEntityScanner.scanName(NameType.ATTRIBUTENAME);
                 if (aName == null) {
                     reportFatalError("MSG_NAME_REQUIRED_IN_NOTATIONTYPE",
                     new Object[]{elName, atName});
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java	Thu Apr 27 03:09:52 2017 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java	Fri Jul 14 00:56:15 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -411,7 +411,7 @@
         if (DEBUG_START_END_ELEMENT) System.out.println(this.getClass().toString() +">>> scanAttribute()");
 
         // name
-        fEntityScanner.scanQName(fAttributeQName, NameType.ATTRIBUTE);
+        fEntityScanner.scanQName(fAttributeQName, NameType.ATTRIBUTENAME);
 
         // equals
         fEntityScanner.skipSpaces();
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java	Thu Apr 27 03:09:52 2017 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java	Fri Jul 14 00:56:15 2017 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, 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
@@ -562,6 +562,14 @@
                 switchToXML11Scanner();
             }
 
+            if (fEventType == XMLStreamConstants.CHARACTERS ||
+                    fEventType == XMLStreamConstants.ENTITY_REFERENCE ||
+                    fEventType == XMLStreamConstants.PROCESSING_INSTRUCTION ||
+                    fEventType == XMLStreamConstants.COMMENT ||
+                    fEventType == XMLStreamConstants.CDATA) {
+                    fEntityScanner.checkNodeCount(fEntityScanner.fCurrentEntity);
+            }
+
             return fEventType;
         } catch (IOException ex) {
             // if this error occured trying to resolve the external DTD subset
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties	Thu Apr 27 03:09:52 2017 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties	Fri Jul 14 00:56:15 2017 +0100
@@ -106,7 +106,7 @@
         src-element.2.2 = src-element.2.2: poich\u00E9 ''{0}'' contiene l''attributo ''ref'', il suo contenuto deve corrispondere a (annotation?), ma \u00E8 stato trovato ''{1}''.
         src-element.3 = src-element.3: l''elemento "{0}" ha sia un attributo ''type'' che un elemento figlio "anonymous type". \u00C8 consentito uno solo di questi valori per un elemento.
         src-import.1.1 = src-import.1.1: l''attributo "{0}" dello spazio di nomi di una voce di informazioni di elemento <import> non deve essere uguale al targetNamespace dello schema in cui esiste.
-        src-import.1.2 = src-import.1.2: se l''attributo dello spazio di nomi non \u00E8 presente in una voce di informazioni di elemento <import>, lo schema che lo contiene deve avere un targetNamespace.
+        src-import.1.2 = src-import.1.2: se l'attributo dello spazio di nomi non \u00E8 presente in una voce di informazioni di elemento <import>, lo schema che lo contiene deve avere un targetNamespace.
         src-import.2 = src-import.2: l''elemento radice del documento "{0}" deve avere lo spazio di nomi denominato ''http://www.w3.org/2001/XMLSchema'' e il nome locale ''schema''.
         src-import.3.1 = src-import.3.1: l''attributo "{0}" dello spazio di nomi di una voce di informazioni di elemento <import> deve essere uguale all''attributo targetNamespace ''{1}'' del documento importato.
         src-import.3.2 = src-import.3.2: non esiste alcun attributo dello spazio di nomi nella voce di informazioni di elemento <import>, pertanto il documento importato non pu\u00F2 avere alcun attributo targetNamespace. tuttavia, \u00E8 stato trovato targetNamespace ''{1}'' nel documento importato.
--- a/src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties	Thu Apr 27 03:09:52 2017 +0100
+++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties	Fri Jul 14 00:56:15 2017 +0100
@@ -9,7 +9,7 @@
 FormatFailed = Si \u00E8 verificato un errore interno durante la formattazione del seguente messaggio:\n  
 
 # XPointer Framework Error Messages
-XPointerProcessingError = XPointerProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell''espressione XPointer.
+XPointerProcessingError = XPointerProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell'espressione XPointer.
 InvalidXPointerToken = InvalidXPointerToken: l''espressione XPointer contiene il token non valido ''{0}''.
 InvalidXPointerExpression = InvalidXPointerExpression: l''espressione XPointer ''{0}'' non \u00E8 valida.
 MultipleShortHandPointers = MultipleShortHandPointers: l''espressione XPointer ''{0}'' non \u00E8 valida. Contiene pi\u00F9 puntatori ShortHand. 
@@ -22,6 +22,6 @@
 # XPointer Element Scheme Error Messages
 InvalidElementSchemeToken = InvalidElementSchemeToken: l''espressione XPointer dello schema element() contiene il token non valido ''{0}''.
 InvalidElementSchemeXPointer = InvalidElementSchemeXPointer: l''espressione XPointer ''{0}'' dello schema di elemento non \u00E8 valida.
-XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell''espressione di schema element() XPointer.
+XPointerElementSchemeProcessingError = XPointerElementSchemeProcessingError: si \u00E8 verificato un errore durante l'elaborazione dell'espressione di schema element() XPointer.
 InvalidNCNameInElementSchemeData = InvalidNCNameInElementSchemeData: lo schema element() contiene un puntatore ShortHand ''{0}'' con NCName non valido.
 InvalidChildSequenceCharacter = InvalidChildSequenceCharacter: lo schema element() contiene un carattere di sequenza secondaria ''{0}'' non valido.