# HG changeset patch # User Greg Lewis # Date 1496032296 25200 # Node ID 96518f358a981f4ec17a663accb46bf86c089bbd # Parent a4da72f43097735e2c13c65a40d60ed10d65c27f# Parent 008d9fffd739930d2e768d150e7af9f23e4ddde1 Merge from main OpenJDK repository diff -r a4da72f43097 -r 96518f358a98 .hgtags --- a/.hgtags Sun May 21 11:12:36 2017 -0700 +++ b/.hgtags Sun May 28 21:31:36 2017 -0700 @@ -612,3 +612,6 @@ cd13b280e8247904509c28ee8aa9b45326185dd7 jdk7u111-b01 b198ece212c1f7ff382d9282624411a260b52a55 jdk7u121-b00 51ed13d07beb90ff71d8625d9d6409cc4add5cbc jdk7u131-b00 +f347b141975453f642ae1140a45aa7c6127551dd jdk7u141-b00 +e096a279a1c226d7d3a4aa19d5beeba1fb0507cf jdk7u141-b01 +b4b91a7beb185c0a8a14b83d2b05cfd7fc33c6fe jdk7u141-b02 diff -r a4da72f43097 -r 96518f358a98 src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java --- a/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java Sun May 21 11:12:36 2017 -0700 +++ b/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java Sun May 28 21:31:36 2017 -0700 @@ -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}"}, diff -r a4da72f43097 -r 96518f358a98 src/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java --- a/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java Sun May 21 11:12:36 2017 -0700 +++ b/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Stylesheet.java Sun May 28 21:31:36 2017 -0700 @@ -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", diff -r a4da72f43097 -r 96518f358a98 src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java --- a/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java Sun May 21 11:12:36 2017 -0700 +++ b/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java Sun May 28 21:31:36 2017 -0700 @@ -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 threadLocalPrefixIndex = + new ThreadLocal() { + @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 = diff -r a4da72f43097 -r 96518f358a98 src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java --- a/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java Sun May 21 11:12:36 2017 -0700 +++ b/src/com/sun/org/apache/xerces/internal/impl/XML11NSDocumentScannerImpl.java Sun May 28 21:31:36 2017 -0700 @@ -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(); diff -r a4da72f43097 -r 96518f358a98 src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java --- a/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java Sun May 21 11:12:36 2017 -0700 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java Sun May 28 21:31:36 2017 -0700 @@ -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}); diff -r a4da72f43097 -r 96518f358a98 src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java --- a/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java Sun May 21 11:12:36 2017 -0700 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java Sun May 28 21:31:36 2017 -0700 @@ -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(); diff -r a4da72f43097 -r 96518f358a98 src/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java --- a/src/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java Sun May 21 11:12:36 2017 -0700 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java Sun May 28 21:31:36 2017 -0700 @@ -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 diff -r a4da72f43097 -r 96518f358a98 src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties --- a/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties Sun May 21 11:12:36 2017 -0700 +++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XMLSchemaMessages_it.properties Sun May 28 21:31:36 2017 -0700 @@ -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 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 , 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 , 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 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 , pertanto il documento importato non pu\u00F2 avere alcun attributo targetNamespace. tuttavia, \u00E8 stato trovato targetNamespace ''{1}'' nel documento importato. diff -r a4da72f43097 -r 96518f358a98 src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties --- a/src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties Sun May 21 11:12:36 2017 -0700 +++ b/src/com/sun/org/apache/xerces/internal/impl/msg/XPointerMessages_it.properties Sun May 28 21:31:36 2017 -0700 @@ -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.