changeset 550:93bf25903af0 jdk8-b122

Merge
author lana
date Wed, 25 Dec 2013 10:32:07 -0800
parents 9a3986b21be4 (diff) fad4b4d28599 (current diff)
children 4e35b5b6d2e5 01b611e0c341
files
diffstat 28 files changed, 53 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/sun/org/apache/xalan/internal/XalanConstants.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xalan/internal/XalanConstants.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
--- a/src/com/sun/org/apache/xalan/internal/utils/FeatureManager.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xalan/internal/utils/FeatureManager.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
--- a/src/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, 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
--- a/src/com/sun/org/apache/xerces/internal/impl/Constants.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xerces/internal/impl/Constants.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
--- a/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1142,7 +1142,7 @@
             int i=0;
             for ( i = offset; i < fCurrentEntity.position; i++) {
                 fCurrentEntity.ch[i] = '\n';
-                whiteSpaceLookup[whiteSpaceLen++]=i;
+                storeWhiteSpace(i);
             }
 
             int length = fCurrentEntity.position - offset;
@@ -1163,27 +1163,18 @@
         }
 
         // scan literal value
-        while (fCurrentEntity.position < fCurrentEntity.count) {
-            c = fCurrentEntity.ch[fCurrentEntity.position++];
+        for (; fCurrentEntity.position<fCurrentEntity.count; fCurrentEntity.position++) {
+            c = fCurrentEntity.ch[fCurrentEntity.position];
             if ((c == quote &&
-                 (!fCurrentEntity.literal || isExternal))
-                || c == '%' || !XMLChar.isContent(c)) {
-                fCurrentEntity.position--;
+                    (!fCurrentEntity.literal || isExternal)) ||
+                    c == '%' || !XMLChar.isContent(c)) {
                 break;
             }
-            if(whiteSpaceInfoNeeded){
-                if(c == 0x20 || c == 0x9){
-                    if(whiteSpaceLen < whiteSpaceLookup.length){
-                        whiteSpaceLookup[whiteSpaceLen++]= fCurrentEntity.position-1;
-                    }else{
-                        int [] tmp = new int[whiteSpaceLookup.length*2];
-                        System.arraycopy(whiteSpaceLookup,0,tmp,0,whiteSpaceLookup.length);
-                        whiteSpaceLookup = tmp;
-                        whiteSpaceLookup[whiteSpaceLen++]= fCurrentEntity.position - 1;
-                    }
-                }
+            if (whiteSpaceInfoNeeded && c == '\t') {
+                storeWhiteSpace(fCurrentEntity.position);
             }
         }
+
         int length = fCurrentEntity.position - offset;
         fCurrentEntity.columnNumber += length - newlines;
         content.setValues(fCurrentEntity.ch, offset, length);
@@ -1209,6 +1200,24 @@
 
     } // scanLiteral(int,XMLString):int
 
+    /**
+     * Save whitespace information. Increase the whitespace buffer by 100
+     * when needed.
+     *
+     * For XML 1.0, legal characters below 0x20 are 0x09 (TAB), 0x0A (LF) and 0x0D (CR).
+     *
+     * @param whiteSpacePos position of a whitespace in the scanner entity buffer
+     */
+    private void storeWhiteSpace(int whiteSpacePos) {
+        if (whiteSpaceLen >= whiteSpaceLookup.length) {
+            int [] tmp = new int[whiteSpaceLookup.length + 100];
+            System.arraycopy(whiteSpaceLookup, 0, tmp, 0, whiteSpaceLookup.length);
+            whiteSpaceLookup = tmp;
+        }
+
+        whiteSpaceLookup[whiteSpaceLen++] = whiteSpacePos;
+    }
+
     //CHANGED:
     /**
      * Scans a range of character data up to the specified delimiter,
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
--- a/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
--- a/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/src/com/sun/org/apache/xerces/internal/util/SymbolTable.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/org/apache/xerces/internal/util/SymbolTable.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
--- a/src/com/sun/xml/internal/stream/Entity.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/xml/internal/stream/Entity.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
--- a/src/com/sun/xml/internal/stream/StaxXMLInputSource.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/xml/internal/stream/StaxXMLInputSource.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/src/com/sun/xml/internal/stream/XMLEntityStorage.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/xml/internal/stream/XMLEntityStorage.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/src/com/sun/xml/internal/stream/writers/WriterUtility.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/xml/internal/stream/writers/WriterUtility.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/src/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2013, 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
--- a/src/javax/xml/XMLConstants.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/javax/xml/XMLConstants.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/src/javax/xml/parsers/SAXParser.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/javax/xml/parsers/SAXParser.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, 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
--- a/src/javax/xml/validation/Validator.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/javax/xml/validation/Validator.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/src/javax/xml/xpath/XPathException.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/javax/xml/xpath/XPathException.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/src/javax/xml/xpath/XPathFactory.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/javax/xml/xpath/XPathFactory.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
--- a/src/org/xml/sax/helpers/NewInstance.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/org/xml/sax/helpers/NewInstance.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, 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
--- a/src/org/xml/sax/helpers/ParserAdapter.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/org/xml/sax/helpers/ParserAdapter.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, 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
--- a/src/org/xml/sax/helpers/ParserFactory.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/org/xml/sax/helpers/ParserFactory.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, 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
--- a/src/org/xml/sax/helpers/SecuritySupport.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/org/xml/sax/helpers/SecuritySupport.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2013, 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
--- a/src/org/xml/sax/helpers/XMLReaderFactory.java	Mon Dec 23 14:43:49 2013 -0800
+++ b/src/org/xml/sax/helpers/XMLReaderFactory.java	Wed Dec 25 10:32:07 2013 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2013, 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