Mercurial > hg > openjdk > jdk8 > jaxp
changeset 570:01b611e0c341
Merge
author | asaha |
---|---|
date | Thu, 02 Jan 2014 15:20:52 -0800 |
parents | f2c9c0f64280 (current diff) 93bf25903af0 (diff) |
children | 985376a77c4c |
files | src/com/sun/org/apache/xalan/internal/XalanConstants.java src/com/sun/org/apache/xerces/internal/impl/Constants.java src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java |
diffstat | 29 files changed, 55 insertions(+), 47 deletions(-) [+] |
line wrap: on
line diff
--- a/src/com/sun/org/apache/xalan/internal/XalanConstants.java Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xalan/internal/XalanConstants.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xalan/internal/utils/FeatureManager.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xalan/internal/utils/FeaturePropertyBase.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xerces/internal/impl/Constants.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDTDScannerImpl.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLNSDocumentScannerImpl.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/org/apache/xerces/internal/util/SymbolTable.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/xml/internal/stream/Entity.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/xml/internal/stream/StaxXMLInputSource.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/xml/internal/stream/XMLEntityStorage.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/xml/internal/stream/writers/WriterUtility.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/javax/xml/XMLConstants.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/javax/xml/parsers/SAXParser.java Thu Jan 02 15:20:52 2014 -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/stream/XMLOutputFactory.java Fri Dec 20 07:42:12 2013 -0800 +++ b/src/javax/xml/stream/XMLOutputFactory.java Thu Jan 02 15:20:52 2014 -0800 @@ -241,11 +241,10 @@ * factory class name that provides implementation of the factory. * * <p> - * Note that this is a new method that replaces the deprecated + * Note that this is a new method that replaces the deprecated * {@link #newInstance(java.lang.String, java.lang.ClassLoader) * newInstance(String factoryId, ClassLoader classLoader)} method. - * No changes in behavior are defined by this replacement method relative - * to the deprecated method. + * The original method was incorrectly defined to return XMLInputFactory. * </p> * * @param factoryId Name of the factory to find, same as
--- a/src/javax/xml/validation/Validator.java Fri Dec 20 07:42:12 2013 -0800 +++ b/src/javax/xml/validation/Validator.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/javax/xml/xpath/XPathException.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/javax/xml/xpath/XPathFactory.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/org/xml/sax/helpers/NewInstance.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/org/xml/sax/helpers/ParserAdapter.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/org/xml/sax/helpers/ParserFactory.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/org/xml/sax/helpers/SecuritySupport.java Thu Jan 02 15:20:52 2014 -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 Fri Dec 20 07:42:12 2013 -0800 +++ b/src/org/xml/sax/helpers/XMLReaderFactory.java Thu Jan 02 15:20:52 2014 -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