OpenJDK / portola / portola
changeset 27834:0a96e0cdbae5
Merge
author | lana |
---|---|
date | Thu, 04 Dec 2014 15:22:42 -0800 |
parents | bcdf7a7cb33a 4d13a8a11a8b |
children | 413d643357c0 |
files | |
diffstat | 655 files changed, 64590 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/jaxp/test/TEST.ROOT Thu Dec 04 12:58:16 2014 -0800 +++ b/jaxp/test/TEST.ROOT Thu Dec 04 15:22:42 2014 -0800 @@ -1,3 +1,6 @@ # This file identifies the root of the test-suite hierarchy. # It also contains test-suite configuration information. +# Tests that must run in othervm mode +othervm.dirs=javax/xml/jaxp/unittest +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/TEST.properties Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,3 @@ +# jaxp test uses TestNG +TestNG.dirs = unittest +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6350682.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.common; + +import javax.xml.parsers.SAXParserFactory; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.TransformerFactoryConfigurationError; + +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @bug 6350682 + * @summary Test SAXParserFactory and TransformerFactory can newInstance when setContextClassLoader(null). + */ +public class Bug6350682 { + + @Test + public void testSAXParserFactory() { + try { + Thread.currentThread().setContextClassLoader(null); + if (Bug6350682.class.getClassLoader() == null) + System.out.println("this class loader is NULL"); + else + System.out.println("this class loader is NOT NULL"); + SAXParserFactory factory = SAXParserFactory.newInstance(); + Assert.assertTrue(factory != null, "Failed to get an instance of a SAXParserFactory"); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail("Exception occured: " + e.getMessage()); + } + } + + @Test + public void testTransformerFactory() { + try { + Thread.currentThread().setContextClassLoader(null); + TransformerFactory factory = TransformerFactory.newInstance(); + Assert.assertTrue(factory != null, "Failed to get an instance of a TransformerFactory"); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail("Exception occured: " + e.getMessage()); + } catch (TransformerFactoryConfigurationError error) { + error.printStackTrace(); + Assert.fail(error.toString()); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6723276Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.common; + +import org.testng.annotations.Test; +import org.testng.Assert; +import java.net.URL; +import java.net.URLClassLoader; + +import javax.xml.parsers.SAXParserFactory; + +/* + * @bug 6723276 + * @summary Test JAXP class can be loaded by bootstrap classloader. + */ +public class Bug6723276Test { + + @Test + public void test1() { + try { + SAXParserFactory.newInstance(); + } catch (Exception e) { + if (e.getMessage().indexOf("org.apache.xerces.jaxp.SAXParserFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } + } + } + + @Test + public void test2() { + try { + System.out.println(Thread.currentThread().getContextClassLoader()); + System.out.println(ClassLoader.getSystemClassLoader().getParent()); + Thread.currentThread().setContextClassLoader(new URLClassLoader(new URL[0], ClassLoader.getSystemClassLoader().getParent())); + SAXParserFactory.newInstance(); + } catch (Exception e) { + if (e.getMessage().indexOf("org.apache.xerces.jaxp.SAXParserFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } + } + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6941169.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Bug6941169.xsd"> + <fooTest> + test + + + + information + </fooTest> +</root>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6941169.xsd Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:element name="root"> + <xs:complexType> + <xs:sequence> + <xs:element name="fooTest" type="xs:anySimpleType" fixed="test information"/> + </xs:sequence> + </xs:complexType> + </xs:element> +</xs:schema> +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6941169Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,501 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.common; + +import java.io.InputStream; +import java.io.StringWriter; +import java.security.AllPermission; +import java.security.Permission; +import java.security.Permissions; + +import javax.xml.XMLConstants; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.sax.SAXSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import javax.xml.validation.Validator; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.w3c.dom.Document; +import org.xml.sax.InputSource; + +/* + * @bug 6941169 + * @summary Test use-service-mechanism feature. + */ +public class Bug6941169Test { + static final String SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; + static final String SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource"; + + private static final String DOM_FACTORY_ID = "javax.xml.parsers.DocumentBuilderFactory"; + private static final String SAX_FACTORY_ID = "javax.xml.parsers.SAXParserFactory"; + + // impl specific feature + final String ORACLE_FEATURE_SERVICE_MECHANISM = "http://www.oracle.com/feature/use-service-mechanism"; + + static String _xml = Bug6941169Test.class.getResource("Bug6941169.xml").getPath(); + static String _xsd = Bug6941169Test.class.getResource("Bug6941169.xsd").getPath(); + + @Test + public void testValidation_SAX_withoutServiceMech() { + System.out.println("Validation using SAX Source; Service mechnism is turned off; SAX Impl should be the default:"); + InputSource is = new InputSource(Bug6941169Test.class.getResourceAsStream("Bug6941169.xml")); + SAXSource ss = new SAXSource(is); + System.setProperty(SAX_FACTORY_ID, "MySAXFactoryImpl"); + long start = System.currentTimeMillis(); + try { + SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + factory.setFeature(ORACLE_FEATURE_SERVICE_MECHANISM, false); + Schema schema = factory.newSchema(new StreamSource(_xsd)); + Validator validator = schema.newValidator(); + validator.validate(ss, null); + } catch (Exception e) { + // e.printStackTrace(); + String error = e.getMessage(); + if (error.indexOf("javax.xml.parsers.FactoryConfigurationError: Provider MySAXFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } else { + System.out.println("Default impl is used"); + } + + // System.out.println(e.getMessage()); + + } + long end = System.currentTimeMillis(); + double elapsedTime = ((end - start)); + System.out.println("Time elapsed: " + elapsedTime); + System.clearProperty(SAX_FACTORY_ID); + } + + @Test + public void testValidation_SAX_withServiceMech() { + System.out.println("Validation using SAX Source. Using service mechnism (by default) to find SAX Impl:"); + InputSource is = new InputSource(Bug6941169Test.class.getResourceAsStream("Bug6941169.xml")); + SAXSource ss = new SAXSource(is); + System.setProperty(SAX_FACTORY_ID, "MySAXFactoryImpl"); + long start = System.currentTimeMillis(); + try { + SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + Schema schema = factory.newSchema(new StreamSource(_xsd)); + Validator validator = schema.newValidator(); + validator.validate(ss, null); + Assert.fail("User impl MySAXFactoryImpl should be used."); + } catch (Exception e) { + String error = e.getMessage(); + if (error.indexOf("javax.xml.parsers.FactoryConfigurationError: Provider MySAXFactoryImpl not found") > 0) { + // expected + } + // System.out.println(e.getMessage()); + + } + long end = System.currentTimeMillis(); + double elapsedTime = ((end - start)); + System.out.println("Time elapsed: " + elapsedTime); + System.clearProperty(SAX_FACTORY_ID); + } + + @Test + public void testValidation_SAX_withSM() { + System.out.println("Validation using SAX Source with security manager:"); + InputSource is = new InputSource(Bug6941169Test.class.getResourceAsStream("Bug6941169.xml")); + SAXSource ss = new SAXSource(is); + System.setProperty(SAX_FACTORY_ID, "MySAXFactoryImpl"); + Permissions granted = new java.security.Permissions(); + granted.add(new AllPermission()); + System.setSecurityManager(new MySM(granted)); + + long start = System.currentTimeMillis(); + try { + SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + factory.setFeature(ORACLE_FEATURE_SERVICE_MECHANISM, false); + Schema schema = factory.newSchema(new StreamSource(_xsd)); + Validator validator = schema.newValidator(); + validator.validate(ss, null); + } catch (Exception e) { + String error = e.getMessage(); + if (error.indexOf("javax.xml.parsers.FactoryConfigurationError: Provider MySAXFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } else { + System.out.println("Default impl is used"); + } + + // System.out.println(e.getMessage()); + + } finally { + System.clearProperty(SAX_FACTORY_ID); + System.setSecurityManager(null); + } + long end = System.currentTimeMillis(); + double elapsedTime = ((end - start)); + System.out.println("Time elapsed: " + elapsedTime); + System.setSecurityManager(null); + + } + + @Test + public void testTransform_DOM_withoutServiceMech() { + System.out.println("Transform using DOM Source; Service mechnism is turned off; Default DOM Impl should be the default:"); + DOMSource domSource = new DOMSource(); + domSource.setSystemId(_xml); + + // DOMSource domSource = new + // DOMSource(getDocument(Bug6941169Test.class.getResourceAsStream("Bug6941169.xml"))); + System.setProperty(DOM_FACTORY_ID, "MyDOMFactoryImpl"); + long start = System.currentTimeMillis(); + try { + TransformerFactory factory = TransformerFactory.newInstance(); + factory.setFeature(ORACLE_FEATURE_SERVICE_MECHANISM, false); + + Transformer t = factory.newTransformer(); + + StringWriter result = new StringWriter(); + StreamResult streamResult = new StreamResult(result); + t.transform(domSource, streamResult); + System.out.println("Writing to " + result.toString()); + + } catch (Exception e) { + // e.printStackTrace(); + String error = e.getMessage(); + if (error.indexOf("Provider MyDOMFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } else { + System.out.println("Default impl is used"); + } + + // System.out.println(e.getMessage()); + + } catch (Error e) { + // e.printStackTrace(); + String error = e.getMessage(); + if (error.indexOf("Provider MyDOMFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } else { + System.out.println("Default impl is used"); + } + + // System.out.println(e.getMessage()); + + } + + long end = System.currentTimeMillis(); + double elapsedTime = ((end - start)); + System.out.println("Time elapsed: " + elapsedTime); + System.clearProperty(DOM_FACTORY_ID); + } + + /** this is by default */ + @Test + public void testTransform_DOM_withServiceMech() { + System.out.println("Transform using DOM Source; By default, the factory uses services mechanism to look up impl:"); + DOMSource domSource = new DOMSource(); + domSource.setSystemId(_xml); + + // DOMSource domSource = new + // DOMSource(getDocument(Bug6941169Test.class.getResourceAsStream("Bug6941169.xml"))); + System.setProperty(DOM_FACTORY_ID, "MyDOMFactoryImpl"); + long start = System.currentTimeMillis(); + try { + TransformerFactory factory = TransformerFactory.newInstance(); + Transformer t = factory.newTransformer(); + + StringWriter result = new StringWriter(); + StreamResult streamResult = new StreamResult(result); + t.transform(domSource, streamResult); + System.out.println("Writing to " + result.toString()); + + Assert.fail("User impl MyDOMFactoryImpl should be used."); + + } catch (Exception e) { + String error = e.getMessage(); + if (error.indexOf("Provider MyDOMFactoryImpl not found") > 0) { + // expected + } + System.out.println(error); + + } catch (Error e) { + String error = e.getMessage(); + if (error.indexOf("Provider MyDOMFactoryImpl not found") > 0) { + // expected + } + System.out.println(error); + + } + + long end = System.currentTimeMillis(); + double elapsedTime = ((end - start)); + System.out.println("Time elapsed: " + elapsedTime); + System.clearProperty(DOM_FACTORY_ID); + } + + @Test + public void testTransform_DOM_withSM() { + System.out.println("Transform using DOM Source; Security Manager is set:"); + DOMSource domSource = new DOMSource(); + domSource.setSystemId(_xml); + + // DOMSource domSource = new + // DOMSource(getDocument(Bug6941169Test.class.getResourceAsStream("Bug6941169.xml"))); + Permissions granted = new java.security.Permissions(); + granted.add(new AllPermission()); + System.setSecurityManager(new MySM(granted)); + System.setProperty(DOM_FACTORY_ID, "MyDOMFactoryImpl"); + long start = System.currentTimeMillis(); + try { + TransformerFactory factory = TransformerFactory.newInstance("com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl", + TransformerFactory.class.getClassLoader()); + Transformer t = factory.newTransformer(); + + StringWriter result = new StringWriter(); + StreamResult streamResult = new StreamResult(result); + t.transform(domSource, streamResult); + System.out.println("Writing to " + result.toString()); + + } catch (Exception e) { + String error = e.getMessage(); + if (error.indexOf("Provider MyDOMFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } else { + System.out.println("Default impl is used"); + } + + // System.out.println(e.getMessage()); + + } catch (Error e) { + String error = e.getMessage(); + if (error.indexOf("Provider MyDOMFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } else { + System.out.println("Default impl is used"); + } + + // System.out.println(e.getMessage()); + + } finally { + System.clearProperty(DOM_FACTORY_ID); + System.setSecurityManager(null); + } + long end = System.currentTimeMillis(); + double elapsedTime = ((end - start)); + System.out.println("Time elapsed: " + elapsedTime); + System.clearProperty(DOM_FACTORY_ID); + } + + @Test + public void testXPath_DOM_withoutServiceMech() { + final String XPATH_EXPRESSION = "/fooTest"; + System.out.println("Evaluate DOM Source; Service mechnism is turned off; Default DOM Impl should be used:"); + Document doc = getDocument(Bug6941169Test.class.getResourceAsStream("Bug6941169.xml")); + System.setProperty(DOM_FACTORY_ID, "MyDOMFactoryImpl"); + long start = System.currentTimeMillis(); + try { + XPathFactory xPathFactory = XPathFactory.newInstance(); + xPathFactory.setFeature(ORACLE_FEATURE_SERVICE_MECHANISM, false); + + XPath xPath = xPathFactory.newXPath(); + + String xPathResult = xPath.evaluate(XPATH_EXPRESSION, doc); + + } catch (Exception e) { + // e.printStackTrace(); + String error = e.getMessage(); + if (error.indexOf("MyDOMFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } else { + System.out.println("Default impl is used"); + } + + // System.out.println(e.getMessage()); + + } catch (Error e) { + // e.printStackTrace(); + String error = e.getMessage(); + if (error.indexOf("MyDOMFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } else { + System.out.println("Default impl is used"); + } + + // System.out.println(e.getMessage()); + + } + + long end = System.currentTimeMillis(); + double elapsedTime = ((end - start)); + System.out.println("Time elapsed: " + elapsedTime); + System.clearProperty(DOM_FACTORY_ID); + } + + @Test + public void testXPath_DOM_withServiceMech() { + final String XPATH_EXPRESSION = "/fooTest"; + System.out.println("Evaluate DOM Source; Service mechnism is on by default; It would try to use MyDOMFactoryImpl:"); + InputStream input = getClass().getResourceAsStream("Bug6941169.xml"); + InputSource source = new InputSource(input); + System.setProperty(DOM_FACTORY_ID, "MyDOMFactoryImpl"); + long start = System.currentTimeMillis(); + try { + XPathFactory xPathFactory = XPathFactory.newInstance(); + + XPath xPath = xPathFactory.newXPath(); + + String xPathResult = xPath.evaluate(XPATH_EXPRESSION, source); + Assert.fail("User impl MyDOMFactoryImpl should be used."); + + } catch (Exception e) { + // e.printStackTrace(); + String error = e.getMessage(); + if (error.indexOf("MyDOMFactoryImpl not found") > 0) { + System.out.println("Tried to locate MyDOMFactoryImpl"); + } else { + Assert.fail(e.getMessage()); + + } + + // System.out.println(e.getMessage()); + + } catch (Error e) { + // e.printStackTrace(); + String error = e.getMessage(); + if (error.indexOf("MyDOMFactoryImpl not found") > 0) { + System.out.println("Tried to locate MyDOMFactoryImpl"); + } else { + Assert.fail(e.getMessage()); + + } + + // System.out.println(e.getMessage()); + + } + + long end = System.currentTimeMillis(); + double elapsedTime = ((end - start)); + System.out.println("Time elapsed: " + elapsedTime); + System.clearProperty(DOM_FACTORY_ID); + } + + @Test + public void testXPath_DOM_withSM() { + final String XPATH_EXPRESSION = "/fooTest"; + System.out.println("Evaluate DOM Source; Security Manager is set:"); + Permissions granted = new java.security.Permissions(); + granted.add(new AllPermission()); + System.setSecurityManager(new MySM(granted)); + InputStream input = getClass().getResourceAsStream("Bug6941169.xml"); + InputSource source = new InputSource(input); + System.setProperty(DOM_FACTORY_ID, "MyDOMFactoryImpl"); + long start = System.currentTimeMillis(); + try { + XPathFactory xPathFactory = XPathFactory.newInstance("http://java.sun.com/jaxp/xpath/dom", + "com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl", null); + + XPath xPath = xPathFactory.newXPath(); + + String xPathResult = xPath.evaluate(XPATH_EXPRESSION, source); + System.out.println("Use default impl"); + } catch (Exception e) { + // e.printStackTrace(); + String error = e.getMessage(); + if (error.indexOf("MyDOMFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } else { + System.out.println("Default impl should be used"); + } + + // System.out.println(e.getMessage()); + + } catch (Error e) { + // e.printStackTrace(); + String error = e.getMessage(); + if (error.indexOf("MyDOMFactoryImpl not found") > 0) { + Assert.fail(e.getMessage()); + } else { + System.out.println("Default impl should be used"); + } + + // System.out.println(e.getMessage()); + + } finally { + System.clearProperty(DOM_FACTORY_ID); + System.setSecurityManager(null); + } + long end = System.currentTimeMillis(); + double elapsedTime = ((end - start)); + System.out.println("Time elapsed: " + elapsedTime); + System.clearProperty(DOM_FACTORY_ID); + } + + @Test + public void testSM() { + SecurityManager sm = System.getSecurityManager(); + if (System.getSecurityManager() != null) { + System.out.println("Security manager not cleared: " + sm.toString()); + } else { + System.out.println("Security manager cleared: "); + } + } + + private static Document getDocument(InputStream in) { + + Document document = null; + + try { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware(true); + DocumentBuilder db = dbf.newDocumentBuilder(); + document = db.parse(in); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail(e.toString()); + } + + return document; + } + + class MySM extends SecurityManager { + Permissions granted; + + public MySM(Permissions perms) { + granted = perms; + } + + @Override + public void checkPermission(Permission perm) { + if (granted.implies(perm)) { + return; + } + super.checkPermission(perm); + } + + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug6979306Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.common; + +import org.testng.annotations.Test; + +import com.sun.org.apache.xalan.internal.xslt.EnvironmentCheck; + +/* + * @bug 6979306 + * @summary Test JAXP component version. + */ +public class Bug6979306Test { + + @Test + public void test() { + String[] input = {}; + EnvironmentCheck.main(input); + com.sun.org.apache.xerces.internal.impl.Version.main(input); + com.sun.org.apache.xalan.internal.Version._main(input); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/common/Bug7143711Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.common; + +import java.security.AllPermission; +import java.security.Permission; +import java.security.Permissions; + +import javax.xml.XMLConstants; +import javax.xml.transform.TransformerFactory; +import javax.xml.validation.SchemaFactory; +import javax.xml.xpath.XPathFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @bug 7143711 + * @summary Test set use-service-mechanism shall not override what's set by the constructor in secure mode. + */ +public class Bug7143711Test { + static final String SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; + static final String SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource"; + + private static final String DOM_FACTORY_ID = "javax.xml.parsers.DocumentBuilderFactory"; + private static final String SAX_FACTORY_ID = "javax.xml.parsers.SAXParserFactory"; + + // impl specific feature + final String ORACLE_FEATURE_SERVICE_MECHANISM = "http://www.oracle.com/feature/use-service-mechanism"; + + @Test + public void testValidation_SAX_withSM() { + System.out.println("Validation using SAX Source with security manager:"); + System.setProperty(SAX_FACTORY_ID, "MySAXFactoryImpl"); + Permissions granted = new java.security.Permissions(); + granted.add(new AllPermission()); + System.setSecurityManager(new MySM(granted)); + + try { + SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + // should not allow + factory.setFeature(ORACLE_FEATURE_SERVICE_MECHANISM, true); + if ((boolean) factory.getFeature(ORACLE_FEATURE_SERVICE_MECHANISM)) { + Assert.fail("should not override in secure mode"); + } + } catch (Exception e) { + Assert.fail(e.getMessage()); + + } finally { + System.clearProperty(SAX_FACTORY_ID); + System.setSecurityManager(null); + } + + System.setSecurityManager(null); + + } + + @Test + public void testTransform_DOM_withSM() { + System.out.println("Transform using DOM Source; Security Manager is set:"); + + Permissions granted = new java.security.Permissions(); + granted.add(new AllPermission()); + System.setSecurityManager(new MySM(granted)); + System.setProperty(DOM_FACTORY_ID, "MyDOMFactoryImpl"); + + try { + TransformerFactory factory = TransformerFactory.newInstance("com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl", + TransformerFactory.class.getClassLoader()); + factory.setFeature(ORACLE_FEATURE_SERVICE_MECHANISM, true); + if (((com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl) factory).useServicesMechnism()) { + Assert.fail("should not override in secure mode"); + } + + } catch (Exception e) { + Assert.fail(e.getMessage()); + } finally { + System.clearProperty(DOM_FACTORY_ID); + System.setSecurityManager(null); + } + + System.clearProperty(DOM_FACTORY_ID); + } + + @Test + public void testXPath_DOM_withSM() { + System.out.println("Evaluate DOM Source; Security Manager is set:"); + Permissions granted = new java.security.Permissions(); + granted.add(new AllPermission()); + System.setSecurityManager(new MySM(granted)); + System.setProperty(DOM_FACTORY_ID, "MyDOMFactoryImpl"); + + try { + XPathFactory xPathFactory = XPathFactory.newInstance("http://java.sun.com/jaxp/xpath/dom", + "com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl", null); + xPathFactory.setFeature(ORACLE_FEATURE_SERVICE_MECHANISM, true); + if ((boolean) xPathFactory.getFeature(ORACLE_FEATURE_SERVICE_MECHANISM)) { + Assert.fail("should not override in secure mode"); + } + + } catch (Exception e) { + Assert.fail(e.getMessage()); + } finally { + System.clearProperty(DOM_FACTORY_ID); + System.setSecurityManager(null); + } + + System.clearProperty(DOM_FACTORY_ID); + } + + @Test + public void testSM() { + SecurityManager sm = System.getSecurityManager(); + if (System.getSecurityManager() != null) { + System.out.println("Security manager not cleared: " + sm.toString()); + } else { + System.out.println("Security manager cleared: "); + } + } + + class MySM extends SecurityManager { + Permissions granted; + + public MySM(Permissions perms) { + granted = perms; + } + + @Override + public void checkPermission(Permission perm) { + if (granted.implies(perm)) { + return; + } + super.checkPermission(perm); + } + + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6320118.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.datatype; + +import javax.xml.datatype.DatatypeConfigurationException; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; + +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @bug 6320118 + * @summary Test xml datatype XMLGregorianCalendar. + */ +public class Bug6320118 { + + DatatypeFactory df; + + @Test + public void test1() { + try { + df = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException e) { + Assert.fail(e.getMessage()); + } + + try { + XMLGregorianCalendar calendar = df.newXMLGregorianCalendar(1970, 1, 1, 24, 0, 0, 0, 0); + } catch (IllegalArgumentException e) { + Assert.fail(e.getMessage()); + } + } + + @Test + public void test2() { + try { + df = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException e) { + Assert.fail(e.getMessage()); + } + + try { + XMLGregorianCalendar calendar = df.newXMLGregorianCalendarTime(24, 0, 0, 0); + } catch (IllegalArgumentException e) { + Assert.fail(e.getMessage()); + } + } + + @Test + public void test3() { + try { + df = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException e) { + Assert.fail(e.getMessage()); + } + try { + XMLGregorianCalendar calendar = df.newXMLGregorianCalendar(); + // Must fail as other params are not 0 but undefined + calendar.setHour(24); + Assert.fail("test3() - Expected IllegalArgumentException not thrown"); + } catch (IllegalArgumentException e) { + // falls through + } + } + + @Test + public void test4() { + try { + df = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException e) { + Assert.fail(e.getMessage()); + } + + try { + XMLGregorianCalendar calendar = df.newXMLGregorianCalendar(); + calendar.setTime(24, 0, 0, 0); + } catch (IllegalArgumentException e) { + Assert.fail(e.getMessage()); + } + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6937951Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.datatype; + +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @bug 6937951 + * @summary Test midnight is same as the start of the next day in XMLGregorianCalendar. + */ +public class Bug6937951Test { + + @Test + public void test() throws DatatypeConfigurationException { + DatatypeFactory dtf = DatatypeFactory.newInstance(); + XMLGregorianCalendar c1 = dtf.newXMLGregorianCalendar("1999-12-31T24:00:00"); + XMLGregorianCalendar c2 = dtf.newXMLGregorianCalendar("2000-01-01T00:00:00"); + System.out.println("c1: " + c1.getYear() + "-" + c1.getMonth() + "-" + c1.getDay() + "T" + c1.getHour()); + System.out.println(c1.equals(c2) ? "pass" : "fail"); // fails + if (!c1.equals(c2)) + Assert.fail("hour 24 needs to be treated as equal to hour 0 of the next day"); + if (c1.getYear() != 2000 && c1.getHour() != 0) + Assert.fail("hour 24 needs to be treated as equal to hour 0 of the next day"); + + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug6937964Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,262 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.datatype; + +import java.math.BigDecimal; +import java.math.BigInteger; + +import javax.xml.namespace.QName; + +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @bug 6937964 + * @summary Test Duration is normalized. + */ +public class Bug6937964Test { + /** + * Print debugging to System.err. + */ + private static final boolean DEBUG = false; + /** + * Constant to indicate expected lexical test failure. + */ + private static final String TEST_VALUE_FAIL = "*FAIL*"; + + private static final String FIELD_UNDEFINED = "FIELD_UNDEFINED"; + static final DatatypeConstants.Field[] fields = { DatatypeConstants.YEARS, DatatypeConstants.MONTHS, DatatypeConstants.DAYS, DatatypeConstants.HOURS, + DatatypeConstants.MINUTES, DatatypeConstants.SECONDS }; + + @Test + public void test() throws DatatypeConfigurationException { + DatatypeFactory dtf = DatatypeFactory.newInstance(); + Duration d = dtf.newDurationYearMonth("P20Y15M"); + int years = d.getYears(); + System.out.println(d.getYears() == 21 ? "pass" : "fail"); + } + + @Test + public void testNewDurationYearMonthLexicalRepresentation() throws DatatypeConfigurationException { + DatatypeFactory dtf = DatatypeFactory.newInstance(); + Duration d = dtf.newDurationYearMonth("P20Y15M"); + int years = d.getYears(); + Assert.assertTrue(years == 21, "Return value should be normalized"); + } + + @Test + public void testNewDurationYearMonthMilliseconds() throws DatatypeConfigurationException { + DatatypeFactory dtf = DatatypeFactory.newInstance(); + Duration d = dtf.newDurationYearMonth(671976000000L); + int years = d.getYears(); + System.out.println("Years: " + years); + Assert.assertTrue(years == 21, "Return value should be normalized"); + } + + @Test + public void testNewDurationYearMonthBigInteger() throws DatatypeConfigurationException { + DatatypeFactory dtf = DatatypeFactory.newInstance(); + BigInteger year = new BigInteger("20"); + BigInteger mon = new BigInteger("15"); + Duration d = dtf.newDurationYearMonth(true, year, mon); + int years = d.getYears(); + Assert.assertTrue(years == 21, "Return value should be normalized"); + } + + @Test + public void testNewDurationYearMonthInt() throws DatatypeConfigurationException { + DatatypeFactory dtf = DatatypeFactory.newInstance(); + Duration d = dtf.newDurationYearMonth(true, 20, 15); + int years = d.getYears(); + Assert.assertTrue(years == 21, "Return value should be normalized"); + } + + @Test + public void testNewDurationDayTimeLexicalRepresentation() throws DatatypeConfigurationException { + DatatypeFactory dtf = DatatypeFactory.newInstance(); + Duration d = dtf.newDurationDayTime("P1DT23H59M65S"); + int days = d.getDays(); + Assert.assertTrue(days == 2, "Return value should be normalized"); + } + + @Test + public void testNewDurationDayTimeMilliseconds() throws DatatypeConfigurationException { + DatatypeFactory dtf = DatatypeFactory.newInstance(); + Duration d = dtf.newDurationDayTime(172805000L); + int days = d.getDays(); + Assert.assertTrue(days == 2, "Return value should be normalized"); + } + + @Test + public void testNewDurationDayTimeBigInteger() throws DatatypeConfigurationException { + DatatypeFactory dtf = DatatypeFactory.newInstance(); + BigInteger day = new BigInteger("1"); + BigInteger hour = new BigInteger("23"); + BigInteger min = new BigInteger("59"); + BigInteger sec = new BigInteger("65"); + Duration d = dtf.newDurationDayTime(true, day, hour, min, sec); + int days = d.getDays(); + System.out.println("Days: " + days); + Assert.assertTrue(days == 2, "Return value should be normalized"); + } + + @Test + public void testNewDurationDayTimeInt() throws DatatypeConfigurationException { + DatatypeFactory dtf = DatatypeFactory.newInstance(); + Duration d = dtf.newDurationDayTime(true, 1, 23, 59, 65); + int days = d.getDays(); + System.out.println("Days: " + days); + Assert.assertTrue(days == 2, "Return value should be normalized"); + } + + @Test + public final void testNewDurationYearMonthLexicalRepresentation1() { + + /** + * Lexical test values to test. + */ + final String[] TEST_VALUES_LEXICAL = { "P13M", "P1Y1M", "-P13M", "-P1Y1M", "P1Y", "P1Y", "-P1Y", "-P1Y", "P1Y25M", "P3Y1M", "-P1Y25M", "-P3Y1M" }; + + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException datatypeConfigurationException) { + Assert.fail(datatypeConfigurationException.toString()); + } + + if (DEBUG) { + System.err.println("DatatypeFactory created: " + datatypeFactory.toString()); + } + + // test each value + for (int onTestValue = 0; onTestValue < TEST_VALUES_LEXICAL.length; onTestValue = onTestValue + 2) { + + if (DEBUG) { + System.err.println("testing value: \"" + TEST_VALUES_LEXICAL[onTestValue] + "\", expecting: \"" + TEST_VALUES_LEXICAL[onTestValue + 1] + "\""); + } + + try { + Duration duration = datatypeFactory.newDurationYearMonth(TEST_VALUES_LEXICAL[onTestValue]); + + if (DEBUG) { + System.err.println("Duration created: \"" + duration.toString() + "\""); + } + + // was this expected to fail? + if (TEST_VALUES_LEXICAL[onTestValue + 1].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_LEXICAL[onTestValue] + "\" is invalid yet it created the Duration \"" + duration.toString() + "\""); + } + + // right XMLSchemaType? + // TODO: enable test, it should pass, it fails with Exception(s) + // for now due to a bug + try { + QName xmlSchemaType = duration.getXMLSchemaType(); + if (!xmlSchemaType.equals(DatatypeConstants.DURATION_YEARMONTH)) { + Assert.fail("Duration created with XMLSchemaType of\"" + xmlSchemaType + "\" was expected to be \"" + + DatatypeConstants.DURATION_YEARMONTH + "\" and has the value \"" + duration.toString() + "\""); + } + } catch (IllegalStateException illegalStateException) { + // TODO; this test really should pass + System.err.println("Please fix this bug that is being ignored, for now: " + illegalStateException.getMessage()); + } + + // does it have the right value? + if (!TEST_VALUES_LEXICAL[onTestValue + 1].equals(duration.toString())) { + Assert.fail("Duration created with \"" + TEST_VALUES_LEXICAL[onTestValue] + "\" was expected to be \"" + + TEST_VALUES_LEXICAL[onTestValue + 1] + "\" and has the value \"" + duration.toString() + "\""); + } + + // Duration created with correct value + } catch (Exception exception) { + + if (DEBUG) { + System.err.println("Exception in creating duration: \"" + exception.toString() + "\""); + } + + // was this expected to succed? + if (!TEST_VALUES_LEXICAL[onTestValue + 1].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_LEXICAL[onTestValue] + "\" is valid yet it failed with \"" + exception.toString() + "\""); + } + // expected failure + } + } + } + + /** + * TCK test failure + */ + @Test + public void testNewDurationDayTime005() { + BigInteger one = new BigInteger("1"); + BigInteger zero = new BigInteger("0"); + BigDecimal bdZero = new BigDecimal("0"); + BigDecimal bdOne = new BigDecimal("1"); + + Object[][] values = { + // lex, isPositive, years, month, days, hours, minutes, seconds + { "P1D", Boolean.TRUE, null, null, one, zero, zero, bdZero }, { "PT1H", Boolean.TRUE, null, null, zero, one, zero, bdZero }, + { "PT1M", Boolean.TRUE, null, null, zero, zero, one, bdZero }, { "PT1.1S", Boolean.TRUE, null, null, zero, zero, zero, bdOne }, + { "-PT1H1.1S", Boolean.FALSE, null, null, zero, one, zero, bdOne }, }; + + StringBuffer result = new StringBuffer(); + DatatypeFactory df = null; + + try { + df = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException e) { + Assert.fail(e.toString()); + } + + for (int valueIndex = 0; valueIndex < values.length; ++valueIndex) { + Duration duration = null; + try { + duration = df.newDurationDayTime(values[valueIndex][1].equals(Boolean.TRUE), ((BigInteger) values[valueIndex][4]).intValue(), + ((BigInteger) values[valueIndex][5]).intValue(), ((BigInteger) values[valueIndex][6]).intValue(), + ((BigDecimal) values[valueIndex][7]).intValue()); + } catch (IllegalArgumentException e) { + result.append("; unexpected " + e + " trying to create duration \'" + values[valueIndex][0] + "\'"); + } + if (duration != null) { + if ((duration.getSign() == 1) != values[valueIndex][1].equals(Boolean.TRUE)) { + result.append("; " + values[valueIndex][0] + ": wrong sign " + duration.getSign() + ", expected " + values[valueIndex][1]); + } + for (int i = 0; i < fields.length; ++i) { + Number value = duration.getField(fields[i]); + if ((value != null && values[valueIndex][2 + i] == null) || (value == null && values[valueIndex][2 + i] != null) + || (value != null && !value.equals(values[valueIndex][2 + i]))) { + result.append("; " + values[valueIndex][0] + ": wrong value of the field " + fields[i] + ": \'" + value + "\'" + ", expected \'" + + values[valueIndex][2 + i] + "\'"); + } + } + } + } + + if (result.length() > 0) { + Assert.fail(result.substring(2)); + } + System.out.println("OK"); + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/Bug7042647Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.datatype; + +import java.util.Calendar; +import java.util.GregorianCalendar; + +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @bug 7042647 + * @summary Test getFirstDayOfWeek is correct after converting XMLGregorianCalendar to a GregorianCalendar. + */ +public class Bug7042647Test { + + @Test + public void test() throws DatatypeConfigurationException { + XMLGregorianCalendar xmlCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(1970, 1, 1, 0, 0, 0, 0, 0); + GregorianCalendar calendar = xmlCalendar.toGregorianCalendar(); + int firstDayOfWeek = calendar.getFirstDayOfWeek(); + Calendar defaultCalendar = Calendar.getInstance(); + int defaultFirstDayOfWeek = defaultCalendar.getFirstDayOfWeek(); + if (firstDayOfWeek != defaultFirstDayOfWeek) { + Assert.fail("Failed firstDayOfWeek=" + firstDayOfWeek + " != defaultFirstDayOfWeek=" + defaultFirstDayOfWeek); + } else { + System.out.println("Success firstDayOfWeek=" + firstDayOfWeek + " == defaultFirstDayOfWeek=" + defaultFirstDayOfWeek); + } + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/DatatypeFactoryTest.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,631 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.datatype; + +import java.math.BigDecimal; +import java.math.BigInteger; + +import javax.xml.namespace.QName; + +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @summary Test DatatypeFactory. + */ +public class DatatypeFactoryTest { + + private static final boolean DEBUG = false; + + private static final String TEST_VALUE_FAIL = "*FAIL*"; + + private static final String FIELD_UNDEFINED = "FIELD_UNDEFINED"; + + static int parseInt(String value) { + return FIELD_UNDEFINED.equals(value) ? DatatypeConstants.FIELD_UNDEFINED : Integer.parseInt(value); + } + + static BigDecimal parseBigDecimal(String value) { + return FIELD_UNDEFINED.equals(value) ? null : new BigDecimal(value); + } + + static BigInteger parseBigInteger(String value) { + return FIELD_UNDEFINED.equals(value) ? null : new BigInteger(value); + } + + @Test + public final void testNewDurationMilliseconds() { + + /* + * to generate millisecond values + * final TimeZone GMT = TimeZone.getTimeZone("GMT"); GregorianCalendar + * gregorianCalendar = new GregorianCalendar(GMT); + * gregorianCalendar.setTimeInMillis(0); + * gregorianCalendar.add(Calendar.HOUR_OF_DAY, 1); + * gregorianCalendar.add(Calendar.MINUTE, 1); + * System.err.println("1 hour, 1 minute = " + + * gregorianCalendar.getTimeInMillis() + " milliseconds"); + */ + + /** + * Millisecond test values to test. + */ + final long[] TEST_VALUES_MILLISECONDS = { 0L, // 0 + 1L, // 1 millisecond + -1L, 1000L, // 1 second + -1000L, 1001L, // 1 second, 1 millisecond + -1001L, 60000L, // 1 minute + -60000L, 61000L, // 1 minute, 1 second + -61000L, 3600000L, // 1 hour + -3600000L, 3660000L, // 1 hour, 1 minute + -3660000L, 86400000L, // 1 day + -86400000L, 90000000L, // 1 day, 1 hour + -90000000L, 2678400000L, // 1 month + -2678400000L, 2764800000L, // 1 month, 1 day + -2764800000L, 31536000000L, // 1 year + -31536000000L, 34214400000L, // 1 year, 1 month + -34214400000L }; + + /** + * Millisecond test value results of test. + */ + final String[] TEST_VALUES_MILLISECONDS_RESULTS = { "P0Y0M0DT0H0M0.000S", // 0 + "P0Y0M0DT0H0M0.001S", // 1 millisecond + "-P0Y0M0DT0H0M0.001S", "P0Y0M0DT0H0M1.000S", // 1 second + "-P0Y0M0DT0H0M1.000S", "P0Y0M0DT0H0M1.001S", // 1 second, 1 + // millisecond + "-P0Y0M0DT0H0M1.001S", "P0Y0M0DT0H1M0.000S", // 1 minute + "-P0Y0M0DT0H1M0.000S", "P0Y0M0DT0H1M1.000S", // 1 minute, 1 + // second + "-P0Y0M0DT0H1M1.000S", "P0Y0M0DT1H0M0.000S", // 1 hour + "-P0Y0M0DT1H0M0.000S", "P0Y0M0DT1H1M0.000S", // 1 hour, 1 minute + "-P0Y0M0DT1H1M0.000S", "P0Y0M1DT0H0M0.000S", // 1 day + "-P0Y0M1DT0H0M0.000S", "P0Y0M1DT1H0M0.000S", // 1 day, 1 hour + "-P0Y0M1DT1H0M0.000S", "P0Y1M0DT0H0M0.000S", // 1 month + "-P0Y1M0DT0H0M0.000S", "P0Y1M1DT0H0M0.000S", // 1 month, 1 day + "-P0Y1M1DT0H0M0.000S", "P1Y0M0DT0H0M0.000S", // 1 year + "-P1Y0M0DT0H0M0.000S", "P1Y1M0DT0H0M0.000S", // 1 year, 1 month + "-P1Y1M0DT0H0M0.000S" }; + + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException datatypeConfigurationException) { + Assert.fail(datatypeConfigurationException.toString()); + } + + if (DEBUG) { + System.err.println("DatatypeFactory created: " + datatypeFactory.toString()); + } + + // test each value + for (int onTestValue = 0; onTestValue < TEST_VALUES_MILLISECONDS.length; onTestValue++) { + + if (DEBUG) { + System.err.println("testing value: \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\", expecting: \"" + + TEST_VALUES_MILLISECONDS_RESULTS[onTestValue] + "\""); + } + + try { + Duration duration = datatypeFactory.newDuration(TEST_VALUES_MILLISECONDS[onTestValue]); + + if (DEBUG) { + System.err.println("Duration created: \"" + duration.toString() + "\""); + } + + // was this expected to fail? + if (TEST_VALUES_MILLISECONDS_RESULTS[onTestValue].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\" is invalid yet it created the Duration \"" + duration.toString() + + "\""); + } + + // right XMLSchemaType? + QName xmlSchemaType = duration.getXMLSchemaType(); + if (!xmlSchemaType.equals(DatatypeConstants.DURATION)) { + Assert.fail("Duration created with XMLSchemaType of\"" + xmlSchemaType + "\" was expected to be \"" + DatatypeConstants.DURATION + + "\" and has the value \"" + duration.toString() + "\""); + } + + // does it have the right value? + if (!TEST_VALUES_MILLISECONDS_RESULTS[onTestValue].equals(duration.toString())) { + Assert.fail("Duration created with \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\" was expected to be \"" + + TEST_VALUES_MILLISECONDS_RESULTS[onTestValue] + "\" and has the value \"" + duration.toString() + "\""); + } + + // Duration created with correct value + } catch (Exception exception) { + + if (DEBUG) { + System.err.println("Exception in creating duration: \"" + exception.toString() + "\""); + } + + // was this expected to succed? + if (!TEST_VALUES_MILLISECONDS_RESULTS[onTestValue].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\" is valid yet it failed with \"" + exception.toString() + "\""); + } + // expected failure + } + } + } + + /** + * Test {@link DatatypeFactory.newDurationYearMonth(String + * lexicalRepresentation)}. + */ + @Test + public final void testNewDurationYearMonthLexicalRepresentation() { + + /** + * Lexical test values to test. + */ + final String[] TEST_VALUES_LEXICAL = { null, TEST_VALUE_FAIL, "", TEST_VALUE_FAIL, "-", TEST_VALUE_FAIL, "P", TEST_VALUE_FAIL, "-P", TEST_VALUE_FAIL, + "P1D", TEST_VALUE_FAIL, "P1Y1M1D", TEST_VALUE_FAIL, "P1M", "P1M", "-P1M", "-P1M", "P1Y", "P1Y", "-P1Y", "-P1Y", "P1Y1M", "P1Y1M", "-P1Y1M", + "-P1Y1M" }; + + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException datatypeConfigurationException) { + Assert.fail(datatypeConfigurationException.toString()); + } + + if (DEBUG) { + System.err.println("DatatypeFactory created: " + datatypeFactory.toString()); + } + + // test each value + for (int onTestValue = 0; onTestValue < TEST_VALUES_LEXICAL.length; onTestValue = onTestValue + 2) { + + if (DEBUG) { + System.err.println("testing value: \"" + TEST_VALUES_LEXICAL[onTestValue] + "\", expecting: \"" + TEST_VALUES_LEXICAL[onTestValue + 1] + "\""); + } + + try { + Duration duration = datatypeFactory.newDurationYearMonth(TEST_VALUES_LEXICAL[onTestValue]); + + if (DEBUG) { + System.err.println("Duration created: \"" + duration.toString() + "\""); + } + + // was this expected to fail? + if (TEST_VALUES_LEXICAL[onTestValue + 1].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_LEXICAL[onTestValue] + "\" is invalid yet it created the Duration \"" + duration.toString() + "\""); + } + + // right XMLSchemaType? + // TODO: enable test, it should pass, it fails with Exception(s) + // for now due to a bug + try { + QName xmlSchemaType = duration.getXMLSchemaType(); + if (!xmlSchemaType.equals(DatatypeConstants.DURATION_YEARMONTH)) { + Assert.fail("Duration created with XMLSchemaType of\"" + xmlSchemaType + "\" was expected to be \"" + + DatatypeConstants.DURATION_YEARMONTH + "\" and has the value \"" + duration.toString() + "\""); + } + } catch (IllegalStateException illegalStateException) { + // TODO; this test really should pass + System.err.println("Please fix this bug that is being ignored, for now: " + illegalStateException.getMessage()); + } + + // does it have the right value? + if (!TEST_VALUES_LEXICAL[onTestValue + 1].equals(duration.toString())) { + Assert.fail("Duration created with \"" + TEST_VALUES_LEXICAL[onTestValue] + "\" was expected to be \"" + + TEST_VALUES_LEXICAL[onTestValue + 1] + "\" and has the value \"" + duration.toString() + "\""); + } + + // Duration created with correct value + } catch (Exception exception) { + + if (DEBUG) { + System.err.println("Exception in creating duration: \"" + exception.toString() + "\""); + } + + // was this expected to succed? + if (!TEST_VALUES_LEXICAL[onTestValue + 1].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_LEXICAL[onTestValue] + "\" is valid yet it failed with \"" + exception.toString() + "\""); + } + // expected failure + } + } + } + + /** + * Test {@link DatatypeFactory.newDurationYearMonth(long milliseconds)}. + * + */ + @Test + public final void testNewDurationYearMonthMilliseconds() { + + /** + * Millisecond test values to test. + */ + final long[] TEST_VALUES_MILLISECONDS = { 0L, 1L, -1L, 2678400000L, // 31 + // days, + // e.g. + // 1 + // month + -2678400000L, 5270400000L, // 61 days, e.g. 2 months + -5270400000L, 31622400000L, // 366 days, e.g. 1 year + -31622400000L, 34300800000L, // 397 days, e.g. 1 year, 1 month + -34300800000L }; + + /** + * Millisecond test value results of test. + */ + final String[] TEST_VALUES_MILLISECONDS_RESULTS = { "P0Y0M", "P0Y0M", "P0Y0M", "P0Y1M", "-P0Y1M", "P0Y2M", "-P0Y2M", "P1Y0M", "-P1Y0M", "P1Y1M", + "-P1Y1M" }; + + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException datatypeConfigurationException) { + Assert.fail(datatypeConfigurationException.toString()); + } + + if (DEBUG) { + System.err.println("DatatypeFactory created: " + datatypeFactory.toString()); + } + + // test each value + for (int onTestValue = 0; onTestValue < TEST_VALUES_MILLISECONDS.length; onTestValue++) { + + if (DEBUG) { + System.err.println("testing value: \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\", expecting: \"" + + TEST_VALUES_MILLISECONDS_RESULTS[onTestValue] + "\""); + } + + try { + Duration duration = datatypeFactory.newDurationYearMonth(TEST_VALUES_MILLISECONDS[onTestValue]); + + if (DEBUG) { + System.err.println("Duration created: \"" + duration.toString() + "\""); + } + + // was this expected to fail? + if (TEST_VALUES_MILLISECONDS_RESULTS[onTestValue].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\" is invalid yet it created the Duration \"" + duration.toString() + + "\""); + } + + // right XMLSchemaType? + QName xmlSchemaType = duration.getXMLSchemaType(); + if (!xmlSchemaType.equals(DatatypeConstants.DURATION_YEARMONTH)) { + Assert.fail("Duration created with XMLSchemaType of\"" + xmlSchemaType + "\" was expected to be \"" + DatatypeConstants.DURATION_YEARMONTH + + "\" and has the value \"" + duration.toString() + "\""); + } + + // does it have the right value? + if (!TEST_VALUES_MILLISECONDS_RESULTS[onTestValue].equals(duration.toString())) { + Assert.fail("Duration created with \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\" was expected to be \"" + + TEST_VALUES_MILLISECONDS_RESULTS[onTestValue] + "\" and has the value \"" + duration.toString() + "\""); + } + + // only YEAR & MONTH should have values + int days = duration.getDays(); + int hours = duration.getHours(); + int minutes = duration.getMinutes(); + if (days != 0 || hours != 0 || minutes != 0) { + Assert.fail("xdt:yearMonthDuration created without discarding remaining milliseconds: " + " days = " + days + ", hours = " + hours + + ", minutess = " + minutes); + } + + // Duration created with correct values + } catch (Exception exception) { + + if (DEBUG) { + System.err.println("Exception in creating duration: \"" + exception.toString() + "\""); + } + + // was this expected to succed? + if (!TEST_VALUES_MILLISECONDS_RESULTS[onTestValue].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\" is valid yet it failed with \"" + exception.toString() + "\""); + } + // expected failure + } + } + } + + /** + * Test {@link DatatypeFactory.newDurationDayTime(long milliseconds)}. + */ + @Test + public final void testNewDurationDayTime() { + + /** + * Millisecond test values to test. + */ + final long[] TEST_VALUES_MILLISECONDS = { 0L, 1L, -1L, 2678400000L, // 31 + // days, + // e.g. + // 1 + // month + -2678400000L, 5270400000L, // 61 days, e.g. 2 months + -5270400000L, 31622400000L, // 366 days, e.g. 1 year + -31622400000L, 34300800000L, // 397 days, e.g. 1 year, 1 month + -34300800000L }; + + /** + * Millisecond test value results of test. + */ + final String[] TEST_VALUES_MILLISECONDS_RESULTS = { "P0Y0M0DT0H0M0.000S", "P0Y0M0DT0H0M0.001S", "-P0Y0M0DT0H0M0.001S", "P0Y1M", "-P0Y1M", "P0Y2M", + "-P0Y2M", "P1Y0M", "-P1Y0M", "P1Y1M", "-P1Y1M" }; + + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException datatypeConfigurationException) { + Assert.fail(datatypeConfigurationException.toString()); + } + + if (DEBUG) { + System.err.println("DatatypeFactory created: " + datatypeFactory.toString()); + } + + // test each value + for (int onTestValue = 0; onTestValue < TEST_VALUES_MILLISECONDS.length; onTestValue++) { + + if (DEBUG) { + System.err.println("testing value: \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\", expecting: \"" + + TEST_VALUES_MILLISECONDS_RESULTS[onTestValue] + "\""); + } + + try { + Duration duration = datatypeFactory.newDurationDayTime(TEST_VALUES_MILLISECONDS[onTestValue]); + + if (DEBUG) { + System.err.println("Duration created: \"" + duration.toString() + "\""); + } + + // was this expected to fail? + if (TEST_VALUES_MILLISECONDS_RESULTS[onTestValue].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\" is invalid yet it created the Duration \"" + duration.toString() + + "\""); + } + + // does it have the right value? + if (!TEST_VALUES_MILLISECONDS_RESULTS[onTestValue].equals(duration.toString())) { + // TODO: this is bug that should be fixed + if (false) { + Assert.fail("Duration created with \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\" was expected to be \"" + + TEST_VALUES_MILLISECONDS_RESULTS[onTestValue] + "\" and has the value \"" + duration.toString() + "\""); + } else { + System.err.println("Please fix this bug: " + "Duration created with \"" + TEST_VALUES_MILLISECONDS[onTestValue] + + "\" was expected to be \"" + TEST_VALUES_MILLISECONDS_RESULTS[onTestValue] + "\" and has the value \"" + duration.toString() + + "\""); + } + } + + // only day, hour, minute, and second should have values + QName xmlSchemaType = duration.getXMLSchemaType(); + int years = duration.getYears(); + int months = duration.getMonths(); + + if (!xmlSchemaType.equals(DatatypeConstants.DURATION_DAYTIME) || years != 0 || months != 0) { + // TODO: this is bug that should be fixed + if (false) { + Assert.fail("xdt:dayTimeDuration created without discarding remaining milliseconds: " + " XMLSchemaType = " + xmlSchemaType + + ", years = " + years + ", months = " + months); + } else { + System.err.println("Please fix this bug: " + "xdt:dayTimeDuration created without discarding remaining milliseconds: " + + " XMLSchemaType = " + xmlSchemaType + ", years = " + years + ", months = " + months); + } + } + + // Duration created with correct values + } catch (Exception exception) { + + if (DEBUG) { + System.err.println("Exception in creating duration: \"" + exception.toString() + "\""); + } + + // was this expected to succed? + if (!TEST_VALUES_MILLISECONDS_RESULTS[onTestValue].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_MILLISECONDS[onTestValue] + "\" is valid yet it failed with \"" + exception.toString() + "\""); + } + // expected failure + } + } + } + + /** + * Test {@link DatatypeFactory.newXMLGregorianCalendar(String + * lexicalRepresentation)}. + */ + @Test + public final void testNewXMLGregorianCalendarLexicalRepresentation() { + + /** + * Lexical test values to test. + */ + final String[] TEST_VALUES_LEXICAL = { null, TEST_VALUE_FAIL, "", TEST_VALUE_FAIL, "---01", "---01", // gDay + "---01Z", "---01Z", // gDay, UTC + "---01-08:00", "---01-08:00", // gDay, PDT + "--01--", TEST_VALUE_FAIL, // gMonth pre errata, --MM--(z?) + "--01", "--01", // gMonth + "--01Z", "--01Z", // gMonth, UTC + "--01-08:00", "--01-08:00", // gMonth, PDT + "--01-01", "--01-01", // gMonthDay + "--01-01Z", "--01-01Z", // gMonthDay, UTC + "--01-01-08:00", "--01-01-08:00" // gMonthDay, PDT + }; + + // get a DatatypeFactory + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException datatypeConfigurationException) { + Assert.fail(datatypeConfigurationException.toString()); + } + + if (DEBUG) { + System.err.println("DatatypeFactory created: " + datatypeFactory.toString()); + } + + // test each value + for (int onTestValue = 0; onTestValue < TEST_VALUES_LEXICAL.length; onTestValue = onTestValue + 2) { + + if (DEBUG) { + System.err.println("testing value: \"" + TEST_VALUES_LEXICAL[onTestValue] + "\", expecting: \"" + TEST_VALUES_LEXICAL[onTestValue + 1] + "\""); + } + + try { + XMLGregorianCalendar xmlGregorianCalendar = datatypeFactory.newXMLGregorianCalendar(TEST_VALUES_LEXICAL[onTestValue]); + + if (DEBUG) { + System.err.println("XMLGregorianCalendar created: \"" + xmlGregorianCalendar.toString() + "\""); + } + + // was this expected to fail? + if (TEST_VALUES_LEXICAL[onTestValue + 1].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_LEXICAL[onTestValue] + "\" is invalid yet it created the XMLGregorianCalendar \"" + + xmlGregorianCalendar.toString() + "\""); + } + + // does it have the right value? + if (!TEST_VALUES_LEXICAL[onTestValue + 1].equals(xmlGregorianCalendar.toString())) { + Assert.fail("XMLGregorianCalendar created with \"" + TEST_VALUES_LEXICAL[onTestValue] + "\" was expected to be \"" + + TEST_VALUES_LEXICAL[onTestValue + 1] + "\" and has the value \"" + xmlGregorianCalendar.toString() + "\""); + } + + // XMLGregorianCalendar created with correct value + } catch (Exception exception) { + + if (DEBUG) { + System.err.println("Exception in creating XMLGregorianCalendar: \"" + exception.toString() + "\""); + } + + // was this expected to succed? + if (!TEST_VALUES_LEXICAL[onTestValue + 1].equals(TEST_VALUE_FAIL)) { + Assert.fail("the value \"" + TEST_VALUES_LEXICAL[onTestValue] + "\" is valid yet it failed with \"" + exception.toString() + "\""); + } + // expected failure + } + } + } + + /** + * Test {@link DatatypeFactory.newXMLGregorianCalendar( BigInteger year, int + * month, int day, int hour, int minute, int second, BigDecimal + * fractionalSecond, int timezone)} and + * DatatypeFactory.newXMLGregorianCalendar( int year, int month, int day, + * int hour, int minute, int second, int fractionalSecond, int timezone)} . + */ + @Test + public final void testNewXMLGregorianCalendarYearMonthDayHourMinuteSecondFractionalSecondTimezone() { + + final String[][] invalidDates = { + { "1970", "-1", "1", "0", "0", "0", "0", "0" }, + { "1970", "0", "1", "0", "0", "0", "0", "0" }, + { "1970", "13", "1", "0", "0", "0", "0", "0" }, + { "1970", "1", "-1", "0", "0", "0", "0", "0" }, + { "1970", "1", "0", "0", "0", "0", "0", "0" }, + { "1970", "1", "32", "0", "0", "0", "0", "0" }, + { "1970", "1", "1", "-1", "0", "0", "0", "0" }, + // valid per Schema Errata: + // http://www.w3.org/2001/05/xmlschema-errata#e2-45 + // {"1970", "1", "1", "24", "0", "0", "0", "0" } + // put in a repeat value to preserve offsets & TCK tests + { "1970", "1", "1", "0", "-1", "0", "0", "0" }, { "1970", "1", "1", "0", "-1", "0", "0", "0" }, { "1970", "1", "1", "0", "60", "0", "0", "0" }, + { "1970", "1", "1", "0", "0", "-1", "0", "0" }, { "1970", "1", "1", "0", "0", "61", "0", "0" }, + { "1970", "1", "1", "0", "0", "0", "-0.000001", "0" }, { "1970", "1", "1", "0", "0", "0", "1.0001", "0" }, + { "1970", "1", "1", "0", "0", "0", "0", "841" }, { "1970", "1", "1", "0", "0", "0", "0", "-841" }, }; + + // get a DatatypeFactory + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException datatypeConfigurationException) { + Assert.fail(datatypeConfigurationException.toString()); + } + + if (DEBUG) { + System.err.println("DatatypeFactory created: " + datatypeFactory.toString()); + } + + // test values, expect failure + for (int valueIndex = 0; valueIndex < invalidDates.length; ++valueIndex) { + + try { + + if (DEBUG) { + System.err.println("testing DatatypeFactory.newXMLGregorianCalendar(" + invalidDates[valueIndex][0] + ", " + invalidDates[valueIndex][1] + + ", " + invalidDates[valueIndex][2] + ", " + invalidDates[valueIndex][3] + ", " + invalidDates[valueIndex][4] + ", " + + invalidDates[valueIndex][5] + ", " + invalidDates[valueIndex][6] + ", " + invalidDates[valueIndex][7] + ")"); + } + + XMLGregorianCalendar xmlGregorianCalendar = datatypeFactory.newXMLGregorianCalendar(parseBigInteger(invalidDates[valueIndex][0]), + parseInt(invalidDates[valueIndex][1]), parseInt(invalidDates[valueIndex][2]), parseInt(invalidDates[valueIndex][3]), + parseInt(invalidDates[valueIndex][4]), parseInt(invalidDates[valueIndex][5]), parseBigDecimal(invalidDates[valueIndex][6]), + parseInt(invalidDates[valueIndex][7])); + + if (DEBUG) { + System.err.println("created XMLGregorianCalendar: " + xmlGregorianCalendar.toString()); + } + + // unexpected success, should have failed + Assert.fail("expected IllegalArgumentException " + "for DatatypeFactory.newXMLGregorianCalendar(" + invalidDates[valueIndex][0] + ", " + + invalidDates[valueIndex][1] + ", " + invalidDates[valueIndex][2] + ", " + invalidDates[valueIndex][3] + ", " + + invalidDates[valueIndex][4] + ", " + invalidDates[valueIndex][5] + ", " + invalidDates[valueIndex][6] + ", " + + invalidDates[valueIndex][7] + "). " + "Instead, XMLGregorianCalendar: \"" + xmlGregorianCalendar.toString() + "\" was created."); + } catch (IllegalArgumentException illegalArgumentException) { + // expected failure + if (DEBUG) { + System.err.println("Exception creating XMLGregorianCalendar: " + illegalArgumentException.toString()); + } + } + } + + // test with all ints + int[] testIndex = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, }; + for (int i = 0; i < testIndex.length; ++i) { + int valueIndex = testIndex[i]; + try { + if (DEBUG) { + System.err.println("testing DatatypeFactory.newXMLGregorianCalendar(" + invalidDates[valueIndex][0] + ", " + invalidDates[valueIndex][1] + + ", " + invalidDates[valueIndex][2] + ", " + invalidDates[valueIndex][3] + ", " + invalidDates[valueIndex][4] + ", " + + invalidDates[valueIndex][5] + ", " + invalidDates[valueIndex][6] + ", " + invalidDates[valueIndex][7] + ")"); + } + + XMLGregorianCalendar xmlGregorianCalendar = datatypeFactory.newXMLGregorianCalendar(parseInt(invalidDates[valueIndex][0]), + parseInt(invalidDates[valueIndex][1]), parseInt(invalidDates[valueIndex][2]), parseInt(invalidDates[valueIndex][3]), + parseInt(invalidDates[valueIndex][4]), parseInt(invalidDates[valueIndex][5]), parseInt(invalidDates[valueIndex][6]), + parseInt(invalidDates[valueIndex][7])); + + if (DEBUG) { + System.err.println("created XMLGregorianCalendar: " + xmlGregorianCalendar.toString()); + } + + // unexpected success, should have failed + Assert.fail("expected IllegalArgumentException " + "for DatatypeFactory.newXMLGregorianCalendar(" + invalidDates[valueIndex][0] + ", " + + invalidDates[valueIndex][1] + ", " + invalidDates[valueIndex][2] + ", " + invalidDates[valueIndex][3] + ", " + + invalidDates[valueIndex][4] + ", " + invalidDates[valueIndex][5] + ", " + invalidDates[valueIndex][6] + ", " + + invalidDates[valueIndex][7] + "). " + "Instead, XMLGregorianCalendar: \"" + xmlGregorianCalendar.toString() + "\" was created."); + } catch (IllegalArgumentException illegalArgumentException) { + // expected failure + if (DEBUG) { + System.err.println("Exception creating XMLGregorianCalendar: " + illegalArgumentException.toString()); + } + } + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/DurationTest.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,476 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.datatype; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +import javax.xml.namespace.QName; + +import org.testng.Assert; +import org.testng.AssertJUnit; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +/* + * @summary Test Duration. + */ +public class DurationTest { + + private final static boolean DEBUG = true; + + protected Duration duration = null; + + @BeforeMethod + protected void setUp() { + try { + duration = DatatypeFactory.newInstance().newDuration(100); + } catch (DatatypeConfigurationException dce) { + dce.printStackTrace(); + Assert.fail("Failed to create instance of DatatypeFactory " + dce.getMessage()); + } + } + + @Test + public void testDurationSubtract() { + try { + Duration bigDur = DatatypeFactory.newInstance().newDuration(20000); + Duration smallDur = DatatypeFactory.newInstance().newDuration(10000); + if (smallDur.subtract(bigDur).getSign() != -1) { + Assert.fail("smallDur.subtract(bigDur).getSign() is not -1"); + } + if (bigDur.subtract(smallDur).getSign() != 1) { + Assert.fail("bigDur.subtract(smallDur).getSign() is not 1"); + } + if (smallDur.subtract(smallDur).getSign() != 0) { + Assert.fail("smallDur.subtract(smallDur).getSign() is not 0"); + } + } catch (DatatypeConfigurationException e) { + e.printStackTrace(); + } + } + + @Test + public void testDurationMultiply() { + int num = 5000; // millisends. 5 seconds + int factor = 2; + try { + Duration dur = DatatypeFactory.newInstance().newDuration(num); + if (dur.multiply(factor).getSeconds() != 10) { + Assert.fail("duration.multiply() return wrong value"); + } + // factor is 2*10^(-1) + if (dur.multiply(new BigDecimal(new BigInteger("2"), 1)).getSeconds() != 1) { + Assert.fail("duration.multiply() return wrong value"); + } + if (dur.subtract(DatatypeFactory.newInstance().newDuration(1000)).multiply(new BigDecimal(new BigInteger("2"), 1)).getSeconds() != 0) { + Assert.fail("duration.multiply() return wrong value"); + } + } catch (DatatypeConfigurationException e) { + e.printStackTrace(); + } + } + + @Test + public void testDurationAndCalendar1() { + int year = 1; + int month = 2; + int day = 3; + int hour = 4; + int min = 5; + int sec = 6; + String lexicalRepresentation = "P" + year + "Y" + month + "M" + day + "DT" + hour + "H" + min + "M" + sec + "S"; + try { + Duration dur = DatatypeFactory.newInstance().newDuration(lexicalRepresentation); + System.out.println(dur.toString()); + AssertJUnit.assertTrue("year should be 1", dur.getYears() == year); + AssertJUnit.assertTrue("month should be 2", dur.getMonths() == month); + AssertJUnit.assertTrue("day should be 3", dur.getDays() == day); + AssertJUnit.assertTrue("hour should be 4", dur.getHours() == hour); + AssertJUnit.assertTrue("minute should be 5", dur.getMinutes() == min); + AssertJUnit.assertTrue("second should be 6", dur.getSeconds() == sec); + } catch (DatatypeConfigurationException e) { + e.printStackTrace(); + } + } + + @Test + public void testDurationAndCalendar2() { + try { + AssertJUnit.assertTrue("10.00099S means 10 sec since it will be rounded to zero", DatatypeFactory.newInstance().newDuration("PT10.00099S") + .getTimeInMillis(new Date()) == 10000); + AssertJUnit.assertTrue("10.00099S means 10 sec since it will be rounded to zero", DatatypeFactory.newInstance().newDuration("-PT10.00099S") + .getTimeInMillis(new Date()) == -10000); + AssertJUnit.assertTrue("10.00099S means 10 sec since it will be rounded to zero", DatatypeFactory.newInstance().newDuration("PT10.00099S") + .getTimeInMillis(new GregorianCalendar()) == 10000); + AssertJUnit.assertTrue("10.00099S means 10 sec since it will be rounded to zero", DatatypeFactory.newInstance().newDuration("-PT10.00099S") + .getTimeInMillis(new GregorianCalendar()) == -10000); + } catch (DatatypeConfigurationException e) { + e.printStackTrace(); + } + } + + @Test + public void testDurationAndCalendar3() { + try { + Calendar cal = new GregorianCalendar(); + cal.set(Calendar.SECOND, 59); + DatatypeFactory.newInstance().newDuration(10000).addTo(cal); + AssertJUnit.assertTrue("sec will be 9", cal.get(Calendar.SECOND) == 9); + + Date date = new Date(); + date.setSeconds(59); + DatatypeFactory.newInstance().newDuration(10000).addTo(date); + AssertJUnit.assertTrue("sec will be 9", date.getSeconds() == 9); + } catch (DatatypeConfigurationException e) { + e.printStackTrace(); + } + } + + @Test + public void testEqualsWithDifferentObjectParam() { + + AssertJUnit.assertFalse("equals method should return false for any object other than Duration", duration.equals(new Integer(0))); + } + + @Test + public void testEqualsWithNullObjectParam() { + + AssertJUnit.assertFalse("equals method should return false for null parameter", duration.equals(null)); + } + + @Test + public void testEqualsWithEqualObjectParam() { + try { + AssertJUnit.assertTrue("equals method is expected to return true", duration.equals(DatatypeFactory.newInstance().newDuration(100))); + } catch (DatatypeConfigurationException dce) { + dce.printStackTrace(); + Assert.fail("Failed to create instance of DatatypeFactory " + dce.getMessage()); + } + } + + /** + * Inspired by CR 5077522 Duration.compare makes mistakes for some values. + */ + @Test + public void testCompareWithInderterminateRelation() { + + final String[][] partialOrder = { // partialOrder + { "P1Y", "<>", "P365D" }, { "P1Y", "<>", "P366D" }, { "P1M", "<>", "P28D" }, { "P1M", "<>", "P29D" }, { "P1M", "<>", "P30D" }, { "P1M", "<>", "P31D" }, + { "P5M", "<>", "P150D" }, { "P5M", "<>", "P151D" }, { "P5M", "<>", "P152D" }, { "P5M", "<>", "P153D" }, { "PT2419200S", "<>", "P1M" }, + { "PT2678400S", "<>", "P1M" }, { "PT31536000S", "<>", "P1Y" }, { "PT31622400S", "<>", "P1Y" }, { "PT525600M", "<>", "P1Y" }, + { "PT527040M", "<>", "P1Y" }, { "PT8760H", "<>", "P1Y" }, { "PT8784H", "<>", "P1Y" }, { "P365D", "<>", "P1Y" }, }; + + DatatypeFactory df = null; + try { + df = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException ex) { + ex.printStackTrace(); + Assert.fail(ex.toString()); + } + + boolean compareErrors = false; + + for (int valueIndex = 0; valueIndex < partialOrder.length; ++valueIndex) { + Duration duration1 = df.newDuration(partialOrder[valueIndex][0]); + Duration duration2 = df.newDuration(partialOrder[valueIndex][2]); + int cmp = duration1.compare(duration2); + int expected = ">".equals(partialOrder[valueIndex][1]) ? DatatypeConstants.GREATER + : "<".equals(partialOrder[valueIndex][1]) ? DatatypeConstants.LESSER : "==".equals(partialOrder[valueIndex][1]) ? DatatypeConstants.EQUAL + : DatatypeConstants.INDETERMINATE; + + // just note any errors, do not fail until all cases have been + // tested + if (expected != cmp) { + compareErrors = true; + System.err.println("returned " + cmp2str(cmp) + " for durations \'" + duration1 + "\' and " + duration2 + "\', but expected " + + cmp2str(expected)); + } + } + + if (compareErrors) { + // TODO; fix bug, these tests should pass + if (false) { + Assert.fail("Errors in comparing indeterminate relations, see Stderr"); + } else { + System.err.println("Please fix this bug: " + "Errors in comparing indeterminate relations, see Stderr"); + } + } + } + + public static String cmp2str(int cmp) { + return cmp == DatatypeConstants.LESSER ? "LESSER" : cmp == DatatypeConstants.GREATER ? "GREATER" : cmp == DatatypeConstants.EQUAL ? "EQUAL" + : cmp == DatatypeConstants.INDETERMINATE ? "INDETERMINATE" : "UNDEFINED"; + } + + /** + * Inspired by CR 6238220 javax.xml.datatype.Duration has no clear + * description concerning return values range. + */ + @Test + public void testNormalizedReturnValues() throws Exception { + + final Object[] TEST_VALUES = { + // test 61 seconds -> 1 minute, 1 second + true, // isPositive, + BigInteger.ZERO, // years, + BigInteger.ZERO, // months + BigInteger.ZERO, // days + BigInteger.ZERO, // hours + BigInteger.ZERO, // minutes + new BigDecimal(61), // seconds + 61000L, // durationInMilliSeconds, + "P0Y0M0DT0H0M61S", // lexicalRepresentation + + // test - 61 seconds -> - 1 minute, 1 second + false, // isPositive, + BigInteger.ZERO, // years, + BigInteger.ZERO, // months + BigInteger.ZERO, // days + BigInteger.ZERO, // hours + BigInteger.ZERO, // minutes + new BigDecimal(61), // seconds + 61000L, // durationInMilliSeconds, + "-P0Y0M0DT0H0M61S", // lexicalRepresentation + }; + + final Object[] NORM_VALUES = { + // test 61 seconds -> 1 minute, 1 second + true, // normalized isPositive, + BigInteger.ZERO, // normalized years, + BigInteger.ZERO, // normalized months + BigInteger.ZERO, // normalized days + BigInteger.ZERO, // normalized hours + BigInteger.ONE, // normalized minutes + BigDecimal.ONE, // normalized seconds + 61000L, // normalized durationInMilliSeconds, + "P0Y0M0DT0H1M1.000S", // normalized lexicalRepresentation + + // test - 61 seconds -> - 1 minute, 1 second + false, // normalized isPositive, + BigInteger.ZERO, // normalized years, + BigInteger.ZERO, // normalized months + BigInteger.ZERO, // normalized days + BigInteger.ZERO, // normalized hours + BigInteger.ONE, // normalized minutes + BigDecimal.ONE, // normalized seconds + 61000L, // normalized durationInMilliSeconds, + "-P0Y0M0DT0H1M1.000S" // normalized lexicalRepresentation + }; + + for (int onValue = 0; onValue < TEST_VALUES.length; onValue += 9) { + newDurationTester(((Boolean) TEST_VALUES[onValue]).booleanValue(), // isPositive, + ((Boolean) NORM_VALUES[onValue]).booleanValue(), // normalized + // isPositive, + (BigInteger) TEST_VALUES[onValue + 1], // years, + (BigInteger) NORM_VALUES[onValue + 1], // normalized years, + (BigInteger) TEST_VALUES[onValue + 2], // months + (BigInteger) NORM_VALUES[onValue + 2], // normalized months + (BigInteger) TEST_VALUES[onValue + 3], // days + (BigInteger) NORM_VALUES[onValue + 3], // normalized days + (BigInteger) TEST_VALUES[onValue + 4], // hours + (BigInteger) NORM_VALUES[onValue + 4], // normalized hours + (BigInteger) TEST_VALUES[onValue + 5], // minutes + (BigInteger) NORM_VALUES[onValue + 5], // normalized minutes + (BigDecimal) TEST_VALUES[onValue + 6], // seconds + (BigDecimal) NORM_VALUES[onValue + 6], // normalized seconds + ((Long) TEST_VALUES[onValue + 7]).longValue(), // durationInMilliSeconds, + ((Long) NORM_VALUES[onValue + 7]).longValue(), // normalized + // durationInMilliSeconds, + (String) TEST_VALUES[onValue + 8], // lexicalRepresentation + (String) NORM_VALUES[onValue + 8]); // normalized + // lexicalRepresentation + + newDurationDayTimeTester(((Boolean) TEST_VALUES[onValue]).booleanValue(), // isPositive, + ((Boolean) NORM_VALUES[onValue]).booleanValue(), // normalized + // isPositive, + BigInteger.ZERO, // years, + BigInteger.ZERO, // normalized years, + BigInteger.ZERO, // months + BigInteger.ZERO, // normalized months + (BigInteger) TEST_VALUES[onValue + 3], // days + (BigInteger) NORM_VALUES[onValue + 3], // normalized days + (BigInteger) TEST_VALUES[onValue + 4], // hours + (BigInteger) NORM_VALUES[onValue + 4], // normalized hours + (BigInteger) TEST_VALUES[onValue + 5], // minutes + (BigInteger) NORM_VALUES[onValue + 5], // normalized minutes + (BigDecimal) TEST_VALUES[onValue + 6], // seconds + (BigDecimal) NORM_VALUES[onValue + 6], // normalized seconds + ((Long) TEST_VALUES[onValue + 7]).longValue(), // durationInMilliSeconds, + ((Long) NORM_VALUES[onValue + 7]).longValue(), // normalized + // durationInMilliSeconds, + (String) TEST_VALUES[onValue + 8], // lexicalRepresentation + (String) NORM_VALUES[onValue + 8]); // normalized + // lexicalRepresentation + } + } + + private void newDurationTester(boolean isPositive, boolean normalizedIsPositive, BigInteger years, BigInteger normalizedYears, BigInteger months, + BigInteger normalizedMonths, BigInteger days, BigInteger normalizedDays, BigInteger hours, BigInteger normalizedHours, BigInteger minutes, + BigInteger normalizedMinutes, BigDecimal seconds, BigDecimal normalizedSeconds, long durationInMilliSeconds, long normalizedDurationInMilliSeconds, + String lexicalRepresentation, String normalizedLexicalRepresentation) { + + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException ex) { + ex.printStackTrace(); + Assert.fail(ex.toString()); + } + + // create 4 Durations using the 4 different constructors + + Duration durationBigInteger = datatypeFactory.newDuration(isPositive, years, months, days, hours, minutes, seconds); + durationAssertEquals(durationBigInteger, DatatypeConstants.DURATION, normalizedIsPositive, normalizedYears.intValue(), normalizedMonths.intValue(), + normalizedDays.intValue(), normalizedHours.intValue(), normalizedMinutes.intValue(), normalizedSeconds.intValue(), + normalizedDurationInMilliSeconds, normalizedLexicalRepresentation); + + Duration durationInt = datatypeFactory.newDuration(isPositive, years.intValue(), months.intValue(), days.intValue(), hours.intValue(), + minutes.intValue(), seconds.intValue()); + durationAssertEquals(durationInt, DatatypeConstants.DURATION, normalizedIsPositive, normalizedYears.intValue(), normalizedMonths.intValue(), + normalizedDays.intValue(), normalizedHours.intValue(), normalizedMinutes.intValue(), normalizedSeconds.intValue(), + normalizedDurationInMilliSeconds, normalizedLexicalRepresentation); + + Duration durationMilliseconds = datatypeFactory.newDuration(durationInMilliSeconds); + durationAssertEquals(durationMilliseconds, DatatypeConstants.DURATION, normalizedIsPositive, normalizedYears.intValue(), normalizedMonths.intValue(), + normalizedDays.intValue(), normalizedHours.intValue(), normalizedMinutes.intValue(), normalizedSeconds.intValue(), + normalizedDurationInMilliSeconds, normalizedLexicalRepresentation); + + Duration durationLexical = datatypeFactory.newDuration(lexicalRepresentation); + durationAssertEquals(durationLexical, DatatypeConstants.DURATION, normalizedIsPositive, normalizedYears.intValue(), normalizedMonths.intValue(), + normalizedDays.intValue(), normalizedHours.intValue(), normalizedMinutes.intValue(), normalizedSeconds.intValue(), + normalizedDurationInMilliSeconds, normalizedLexicalRepresentation); + } + + private void newDurationDayTimeTester(boolean isPositive, boolean normalizedIsPositive, BigInteger years, BigInteger normalizedYears, BigInteger months, + BigInteger normalizedMonths, BigInteger days, BigInteger normalizedDays, BigInteger hours, BigInteger normalizedHours, BigInteger minutes, + BigInteger normalizedMinutes, BigDecimal seconds, BigDecimal normalizedSeconds, long durationInMilliSeconds, long normalizedDurationInMilliSeconds, + String lexicalRepresentation, String normalizedLexicalRepresentation) { + + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException ex) { + ex.printStackTrace(); + Assert.fail(ex.toString()); + } + + // create 4 dayTime Durations using the 4 different constructors + + Duration durationDayTimeBigInteger = datatypeFactory.newDurationDayTime(isPositive, days, hours, minutes, seconds.toBigInteger()); + durationAssertEquals(durationDayTimeBigInteger, DatatypeConstants.DURATION_DAYTIME, normalizedIsPositive, normalizedYears.intValue(), + normalizedMonths.intValue(), normalizedDays.intValue(), normalizedHours.intValue(), normalizedMinutes.intValue(), normalizedSeconds.intValue(), + normalizedDurationInMilliSeconds, normalizedLexicalRepresentation); + + /* + * Duration durationDayTimeInt = datatypeFactory.newDurationDayTime( + * isPositive, days.intValue(), hours.intValue(), minutes.intValue(), + * seconds.intValue()); Duration durationDayTimeMilliseconds = + * datatypeFactory.newDurationDayTime( durationInMilliSeconds); Duration + * durationDayTimeLexical = datatypeFactory.newDurationDayTime( + * lexicalRepresentation); + * Duration durationYearMonthBigInteger = + * datatypeFactory.newDurationYearMonth( isPositive, years, months); + * Duration durationYearMonthInt = datatypeFactory.newDurationYearMonth( + * isPositive, years.intValue(), months.intValue()); Duration + * durationYearMonthMilliseconds = datatypeFactory.newDurationYearMonth( + * durationInMilliSeconds); Duration durationYearMonthLexical = + * datatypeFactory.newDurationYearMonth( lexicalRepresentation) ; + */ + + } + + private void durationAssertEquals(Duration duration, QName xmlSchemaType, boolean isPositive, int years, int months, int days, int hours, int minutes, + int seconds, long milliseconds, String lexical) { + + final TimeZone GMT = TimeZone.getTimeZone("GMT"); + final GregorianCalendar EPOCH = new GregorianCalendar(GMT); + EPOCH.clear(); + + if (DEBUG) { + System.out.println("Testing Duration: " + duration.toString()); + } + + // sign + if (DEBUG) { + boolean actual = (duration.getSign() == 1) ? true : false; + System.out.println("sign:"); + System.out.println(" expected: \"" + isPositive + "\""); + System.out.println(" actual: \"" + actual + "\""); + } + + if (DEBUG) { + System.out.println("years:"); + System.out.println(" expected: \"" + years + "\""); + System.out.println(" actual: \"" + duration.getYears() + "\""); + } + + if (DEBUG) { + System.out.println("months:"); + System.out.println(" expected: \"" + months + "\""); + System.out.println(" actual: \"" + duration.getMonths() + "\""); + } + + if (DEBUG) { + System.out.println("days:"); + System.out.println(" expected: \"" + days + "\""); + System.out.println(" actual: \"" + duration.getDays() + "\""); + } + + if (DEBUG) { + System.out.println("hours:"); + System.out.println(" expected: \"" + hours + "\""); + System.out.println(" actual: \"" + duration.getHours() + "\""); + } + + if (DEBUG) { + System.out.println("minutes:"); + System.out.println(" expected: \"" + minutes + "\""); + System.out.println(" actual: \"" + duration.getMinutes() + "\""); + } + + if (DEBUG) { + System.out.println("seconds:"); + System.out.println(" expected: \"" + seconds + "\""); + System.out.println(" actual: \"" + duration.getSeconds() + "\""); + } + + if (DEBUG) { + System.out.println("milliseconds:"); + System.out.println(" expected: \"" + milliseconds + "\""); + System.out.println(" actual: \"" + duration.getTimeInMillis(EPOCH) + "\""); + } + + if (DEBUG) { + System.out.println("lexical:"); + System.out.println(" expected: \"" + lexical + "\""); + System.out.println(" actual: \"" + duration.toString() + "\""); + } + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/FactoryFindTest.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.datatype; + +import java.net.URL; +import java.net.URLClassLoader; + +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @summary Test Classloader for DatatypeFactory. + */ +public class FactoryFindTest { + + boolean myClassLoaderUsed = false; + + public FactoryFindTest(String name) { + } + + @Test + public void testFactoryFind() { + try { + // System.setProperty("jaxp.debug", "true"); + + DatatypeFactory factory = DatatypeFactory.newInstance(); + Assert.assertTrue(factory.getClass().getClassLoader() == null); + + Thread.currentThread().setContextClassLoader(null); + factory = DatatypeFactory.newInstance(); + Assert.assertTrue(factory.getClass().getClassLoader() == null); + + Thread.currentThread().setContextClassLoader(new MyClassLoader()); + factory = DatatypeFactory.newInstance(); + if (System.getSecurityManager() == null) + Assert.assertTrue(myClassLoaderUsed); + else + Assert.assertFalse(myClassLoaderUsed); + } catch (Exception ex) { + } + + } + + class MyClassLoader extends URLClassLoader { + + public MyClassLoader() { + super(new URL[0]); + } + + public Class loadClass(String name) throws ClassNotFoundException { + myClassLoaderUsed = true; + return super.loadClass(name); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/datatype/XMLGregorianCalendarTest.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.datatype; + +import org.testng.Assert; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +/* + * @summary Test XMLGregorianCalendar. + */ +public class XMLGregorianCalendarTest { + + private static final boolean DEBUG = false; + + private static final int TEST_VALUE_FAIL = 0; + + private static final int TEST_VALUE_PASS = 1; + + private XMLGregorianCalendar calendar; + + @BeforeMethod + protected void setUp() { + try { + calendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(); + } catch (DatatypeConfigurationException dce) { + dce.printStackTrace(); + Assert.fail("Failed to create instance of DatatypeFactory " + dce.getMessage()); + } + } + + @Test + public final void testSetTime() { + + /** + * Hour, minute, second values to test and expected result. + */ + final int[] TEST_VALUES = { 24, 0, 0, TEST_VALUE_PASS, 24, 1, 0, TEST_VALUE_FAIL, 24, 0, 1, TEST_VALUE_FAIL, 24, DatatypeConstants.FIELD_UNDEFINED, 0, + TEST_VALUE_FAIL, 24, 0, DatatypeConstants.FIELD_UNDEFINED, TEST_VALUE_FAIL }; + + // create DatatypeFactory + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException datatypeConfigurationException) { + Assert.fail(datatypeConfigurationException.toString()); + } + + if (DEBUG) { + System.err.println("DatatypeFactory created: " + datatypeFactory.toString()); + } + + // create XMLGregorianCalendar + XMLGregorianCalendar xmlGregorianCalendar = datatypeFactory.newXMLGregorianCalendar(); + + // test each value + for (int onTestValue = 0; onTestValue < TEST_VALUES.length; onTestValue = onTestValue + 4) { + + if (DEBUG) { + System.err.println("testing values: (" + TEST_VALUES[onTestValue] + ", " + TEST_VALUES[onTestValue + 1] + ", " + TEST_VALUES[onTestValue + 2] + + ") expected (0=fail, 1=pass): " + TEST_VALUES[onTestValue + 3]); + } + + try { + // set time + xmlGregorianCalendar.setTime(TEST_VALUES[onTestValue], TEST_VALUES[onTestValue + 1], TEST_VALUES[onTestValue + 2]); + + if (DEBUG) { + System.err.println("XMLGregorianCalendar created: \"" + xmlGregorianCalendar.toString() + "\""); + } + + // was this expected to fail? + if (TEST_VALUES[onTestValue + 3] == TEST_VALUE_FAIL) { + Assert.fail("the values: (" + TEST_VALUES[onTestValue] + ", " + TEST_VALUES[onTestValue + 1] + ", " + TEST_VALUES[onTestValue + 2] + + ") are invalid, " + "yet it created the XMLGregorianCalendar \"" + xmlGregorianCalendar.toString() + "\""); + } + } catch (Exception exception) { + + if (DEBUG) { + System.err.println("Exception in creating XMLGregorianCalendar: \"" + exception.toString() + "\""); + } + + // was this expected to succed? + if (TEST_VALUES[onTestValue + 3] == TEST_VALUE_PASS) { + Assert.fail("the values: (" + TEST_VALUES[onTestValue] + ", " + TEST_VALUES[onTestValue + 1] + ", " + TEST_VALUES[onTestValue + 2] + + ") are valid yet it failed with \"" + exception.toString() + "\""); + } + // expected failure + } + } + } + + @Test + public final void testSetHour() { + + /** + * Hour values to test and expected result. + */ + final int[] TEST_VALUES = { + // setTime(H, M, S), hour override, expected result + 0, 0, 0, 0, TEST_VALUE_PASS, 0, 0, 0, 23, TEST_VALUE_PASS, 0, 0, 0, 24, TEST_VALUE_PASS, + // creates invalid state + 0, 0, 0, DatatypeConstants.FIELD_UNDEFINED, TEST_VALUE_FAIL, + // violates Schema Errata + 0, 0, 1, 24, TEST_VALUE_FAIL }; + + // create DatatypeFactory + DatatypeFactory datatypeFactory = null; + try { + datatypeFactory = DatatypeFactory.newInstance(); + } catch (DatatypeConfigurationException datatypeConfigurationException) { + Assert.fail(datatypeConfigurationException.toString()); + } + + if (DEBUG) { + System.err.println("DatatypeFactory created: " + datatypeFactory.toString()); + } + + // create XMLGregorianCalendar + XMLGregorianCalendar xmlGregorianCalendar = datatypeFactory.newXMLGregorianCalendar(); + + // test each value + for (int onTestValue = 0; onTestValue < TEST_VALUES.length; onTestValue = onTestValue + 5) { + + if (DEBUG) { + System.err.println("testing values: (" + TEST_VALUES[onTestValue] + ", " + TEST_VALUES[onTestValue + 1] + ", " + TEST_VALUES[onTestValue + 2] + + ", " + TEST_VALUES[onTestValue + 3] + ") expected (0=fail, 1=pass): " + TEST_VALUES[onTestValue + 4]); + } + + try { + // set time to known valid value + xmlGregorianCalendar.setTime(TEST_VALUES[onTestValue], TEST_VALUES[onTestValue + 1], TEST_VALUES[onTestValue + 2]); + // now explicitly set hour + xmlGregorianCalendar.setHour(TEST_VALUES[onTestValue + 3]); + + if (DEBUG) { + System.err.println("XMLGregorianCalendar created: \"" + xmlGregorianCalendar.toString() + "\""); + } + + // was this expected to fail? + if (TEST_VALUES[onTestValue + 4] == TEST_VALUE_FAIL) { + Assert.fail("the values: (" + TEST_VALUES[onTestValue] + ", " + TEST_VALUES[onTestValue + 1] + ", " + TEST_VALUES[onTestValue + 2] + ", " + + TEST_VALUES[onTestValue + 3] + ") are invalid, " + "yet it created the XMLGregorianCalendar \"" + xmlGregorianCalendar.toString() + + "\""); + } + } catch (Exception exception) { + + if (DEBUG) { + System.err.println("Exception in creating XMLGregorianCalendar: \"" + exception.toString() + "\""); + } + + // was this expected to succed? + if (TEST_VALUES[onTestValue + 4] == TEST_VALUE_PASS) { + Assert.fail("the values: (" + TEST_VALUES[onTestValue] + ", " + TEST_VALUES[onTestValue + 1] + ", " + TEST_VALUES[onTestValue + 2] + ", " + + TEST_VALUES[onTestValue + 3] + ") are valid yet it failed with \"" + exception.toString() + "\""); + } + // expected failure + } + } + } + + @Test + public void testEqualsWithDifferentObjectParam() { + + Assert.assertFalse(calendar.equals(new Integer(0)), "equals method should return false for any object other" + " than XMLGregorianCalendar"); + } + + @Test + public void testEqualsWithNullObjectParam() { + + Assert.assertFalse(calendar.equals(null), "equals method should return false for null parameter"); + } + + @Test + public void testEqualsWithEqualObjectParam() { + + try { + Assert.assertTrue(calendar.equals(DatatypeFactory.newInstance().newXMLGregorianCalendar()), "equals method is expected to return true"); + } catch (DatatypeConfigurationException dce) { + dce.printStackTrace(); + Assert.fail("Failed to create instance of DatatypeFactory " + dce.getMessage()); + } + } + + @Test + public void testToString() { + try { + String inputDateTime = "2006-10-23T22:15:01.000000135+08:00"; + DatatypeFactory factory = DatatypeFactory.newInstance(); + XMLGregorianCalendar calendar = factory.newXMLGregorianCalendar(inputDateTime); + String toStr = calendar.toString(); + Assert.assertTrue(toStr.indexOf("E") == -1, "String value cannot contain exponent"); + } catch (DatatypeConfigurationException dce) { + dce.printStackTrace(); + Assert.fail("Failed to create instance of DatatypeFactory " + dce.getMessage()); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4674384_MAX_OCCURS_Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.File; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.xml.sax.helpers.DefaultHandler; + +/* + * @bug 4674384 + * @summary Test large maxOccurs. + */ +public class Bug4674384_MAX_OCCURS_Test { + + @Test + public final void testLargeMaxOccurs() { + + String XML_FILE_NAME = "Bug4674384_MAX_OCCURS_Test.xml"; + + try { + // create and initialize the parser + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setNamespaceAware(true); + spf.setValidating(true); + + SAXParser parser = spf.newSAXParser(); + parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); + + File xmlFile = new File(getClass().getResource(XML_FILE_NAME).getPath()); + + parser.parse(xmlFile, new DefaultHandler()); + } catch (Exception e) { + System.err.println("Failure: File " + XML_FILE_NAME + " was parsed with a large value of maxOccurs."); + e.printStackTrace(); + Assert.fail("Failure: File " + XML_FILE_NAME + " was parsed with a large value of maxOccurs. " + e.getMessage()); + } + + System.out.println("Success: File " + XML_FILE_NAME + " was parsed with a large value of maxOccurs."); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4674384_MAX_OCCURS_Test.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<test:a + xmlns:test="test" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="test Bug4674384_MAX_OCCURS_Test.xsd"> +<b>1</b> +<b>2</b> +</test:a>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4674384_MAX_OCCURS_Test.xsd Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,15 @@ +<?xml version="1.0"?> + +<xsd:schema + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns="test" + targetNamespace="test"> + + <xsd:element name="a" type="A"/> + <xsd:complexType name="A"> + <xsd:sequence> + <xsd:element name="b" type="xsd:string" maxOccurs="3000"/> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4934208.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.XMLReader; + +import util.DraconianErrorHandler; + +/* + * @bug 4934208 + * @summary Test SAXParser can parse keyref constraint with a selector that is a union xpath expression selecting a node and its child. + */ +public class Bug4934208 { + @Test + public void test1() throws Exception { + parse(new InputSource(Bug4934208.class.getResourceAsStream("test1.xml"))); + } + + @Test + public void test2() throws Exception { + try { + parse(new InputSource(Bug4934208.class.getResourceAsStream("test2.xml"))); + } catch (SAXException e) { + Assert.assertTrue(e.getMessage().startsWith("cvc-complex-type.2.4.a")); + } + } + + private void parse(InputSource is) throws Exception { + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setNamespaceAware(true); + spf.setValidating(true); + SAXParser parser = spf.newSAXParser(); + + parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); + parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", Bug4934208.class.getResourceAsStream("test.xsd")); + + XMLReader r = parser.getXMLReader(); + + r.setErrorHandler(new DraconianErrorHandler()); + r.parse(is); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4967002.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.StringReader; + +import javax.xml.XMLConstants; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.xml.sax.InputSource; + +/* + * @bug 4967002 + * @summary Test DocumentBuilderFactory.newDocumentBuilder() throws ParserConfigurationException + * when it uses the "http://java.sun.com/xml/jaxp/properties/schemaSource" property + * and/or the "http://java.sun.com/xml/jaxp/properties/schemaLanguage" property + * in conjunction with setting a Schema object. + */ +public class Bug4967002 { + String schemaSource = "<?xml version='1.0'?>\n" + "<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'>\n" + " <xsd:element name='test101'>\n" + + " <xsd:complexType>\n" + " <xsd:attribute name='attr'/>\n" + " <xsd:attribute name='attr2' default='DEF'/>\n" + + " </xsd:complexType>\n" + " </xsd:element>\n" + "</xsd:schema>\n"; + + Schema createSchema() { + SchemaFactory schFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + try { + Schema sch = schFactory.newSchema(new StreamSource(new StringReader(schemaSource))); + return sch; + } catch (Exception se) { + throw new IllegalStateException("No Schema : " + se); + } + } + + @Test + public void test1() { + setAttr(true); + } + + @Test + public void test2() { + setAttr(false); + } + + void setAttr(boolean setSrc) { + DocumentBuilderFactory docBFactory = DocumentBuilderFactory.newInstance(); + Schema sch = createSchema(); + docBFactory.setSchema(sch); + docBFactory.setNamespaceAware(true); + docBFactory.setValidating(true); + + final String aSchemaLanguage = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; + final String aSchemaSource = "http://java.sun.com/xml/jaxp/properties/schemaSource"; + + docBFactory.setAttribute(aSchemaLanguage, "http://www.w3.org/2001/XMLSchema"); + // System.out.println("---- Set schemaLanguage: " + + // docBFactory.getAttribute(aSchemaLanguage)); + if (setSrc) { + docBFactory.setAttribute(aSchemaSource, new InputSource(new StringReader(schemaSource))); + // System.out.println("---- Set schemaSource: " + + // docBFactory.getAttribute(aSchemaSource)); + } + + try { + docBFactory.newDocumentBuilder(); + Assert.fail("ParserConfigurationException expected"); + } catch (ParserConfigurationException pce) { + return; // success + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4985486.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import javax.xml.parsers.SAXParserFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +/* + * @bug 4985486 + * @summary Test SAXParser can parse large characters(more than 10000). + */ +public class Bug4985486 { + + @Test + public void test1() throws Exception { + SAXParserFactory spf = SAXParserFactory.newInstance(); + System.out.println(spf.getClass().getName()); + spf.setNamespaceAware(true); + spf.newSAXParser().parse(Bug4985486.class.getResourceAsStream("Bug4985486.xml"), new Handler()); + } + + private class Handler extends DefaultHandler { + StringBuffer buf = new StringBuffer(); + + public void characters(char[] ch, int start, int length) throws SAXException { + buf.append(ch, start, length); + } + + public void endDocument() throws SAXException { + String contents = buf.toString(); + Assert.assertTrue(contents.endsWith("[END]")); + while (contents.length() >= 10) { + Assert.assertTrue(contents.startsWith("0123456789")); + contents = contents.substring(10); + } + } + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4985486.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<root>0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789[END]</root>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991020.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.testng.annotations.Test; + +/* + * @bug 4991020 + * @summary Test XPath like "node_name/." can be parsed. + */ +public class Bug4991020 { + + protected static SAXParser createParser() throws Exception { + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setNamespaceAware(true); + spf.setValidating(true); + SAXParser parser = spf.newSAXParser(); + parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); + + return parser; + } + + @Test + public void test1() throws Exception { + SAXParser parser = createParser(); + parser.parse(Bug4991020.class.getResource("Bug4991020.xml").toExternalForm(), new util.DraconianErrorHandler()); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991020.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<test:root xmlns:test="test" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="test Bug4991020.xsd" +><child>123</child></test:root>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991020.xsd Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="test"> + <xsd:element name="root"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="child" type="xsd:string"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:key name="key1"> + <xsd:selector xpath="."/> + <xsd:field xpath="child/."/> + </xsd:key> + </xsd:element> +</xsd:schema>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991946.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.testng.annotations.Test; + +/* + * @bug 4991946 + * @summary Can parse the element type is anyType in the schema and is substituted by the simple type via the 'xsi:type' attribute in xml document. + */ +public class Bug4991946 { + + protected static SAXParser createParser() throws Exception { + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setNamespaceAware(true); + spf.setValidating(true); + SAXParser parser = spf.newSAXParser(); + parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); + + return parser; + } + + @Test + public void test1() throws Exception { + SAXParser parser = createParser(); + parser.parse(Bug4991946.class.getResource("Bug4991946.xml").toExternalForm(), new util.DraconianErrorHandler()); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991946.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<test:root xmlns:test="test" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="test Bug4991946.xsd" + xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <child xsi:type="xsd:string">123</child> +</test:root>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug4991946.xsd Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="test"> + <xsd:element name="root"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="child" type="xsd:anyType"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:key name="key1"> + <xsd:selector xpath="."/> + <xsd:field xpath="child"/> + </xsd:key> + </xsd:element> +</xsd:schema>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5010072.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import javax.xml.validation.SchemaFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; +import org.xml.sax.helpers.DefaultHandler; + +/* + * @bug 5010072 + * @summary Test SchemaFactory throws SAXException if xpath is "@". + */ +public class Bug5010072 { + + protected static class ErrorHandler extends DefaultHandler { + public int errorCounter = 0; + + public void error(SAXParseException e) throws SAXException { + + System.err.println("Error: " + "[[" + e.getPublicId() + "][" + e.getSystemId() + "]]" + "[[" + e.getLineNumber() + "][" + e.getColumnNumber() + + "]]" + e); + + errorCounter++; + + throw e; + } + + public void fatalError(SAXParseException e) throws SAXException { + System.err.println("Fatal Error: " + e); + errorCounter++; + } + } + + @Test + public void test1() throws Exception { + SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); + + ErrorHandler errorHandler = new ErrorHandler(); + schemaFactory.setErrorHandler(errorHandler); + + try { + schemaFactory.newSchema(Bug5010072.class.getResource("Bug5010072.xsd")); + Assert.fail("should fail to compile"); + } catch (SAXException e) { + ; // as expected + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5010072.xsd Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <xsd:element name="root"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="tid" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + <xsd:unique id="foo123" name="uid"> + <xsd:selector xpath=".//tid"/> + <xsd:field xpath="@"/> + </xsd:unique> + </xsd:element> +</xsd:schema>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug5025825.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.StringReader; + +import javax.xml.XMLConstants; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +/* + * @bug 5025825 + * @summary Test if SAXParserFactory set a Schema object, when SAXParser sets "http://java.sun.com/xml/jaxp/properties/schemaSource" property + * and/or "http://java.sun.com/xml/jaxp/properties/schemaLanguage" property, it shall throw SAXException. + */ +public class Bug5025825 { + + String schemaSource = "<?xml version='1.0'?>\n" + "<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'>\n" + " <xsd:element name='test101'>\n" + + " <xsd:complexType>\n" + " <xsd:attribute name='attr'/>\n" + " <xsd:attribute name='attr2' default='DEF'/>\n" + + " </xsd:complexType>\n" + " </xsd:element>\n" + "</xsd:schema>\n"; + + private Schema createSchema() throws SAXException { + SchemaFactory schFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + return schFactory.newSchema(new StreamSource(new StringReader(schemaSource))); + } + + @Test + public void test1() throws Exception { + Schema sch = createSchema(); + Assert.assertNotNull(sch); + + SAXParserFactory spFactory = SAXParserFactory.newInstance(); + spFactory.setNamespaceAware(true); + spFactory.setValidating(true); + spFactory.setSchema(sch); + + SAXParser sParser = spFactory.newSAXParser(); + + final String aSchemaLanguage = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; + final String aSchemaSource = "http://java.sun.com/xml/jaxp/properties/schemaSource"; + + try { + sParser.setProperty(aSchemaLanguage, "http://www.w3.org/2001/XMLSchema"); + Assert.fail("---- Set schemaLanguage: " + sParser.getProperty(aSchemaLanguage)); + } catch (SAXException e) { + ; // as expected + } + + try { + sParser.setProperty(aSchemaSource, new InputSource(new StringReader(schemaSource))); + Assert.fail("---- Set schemaSource: " + sParser.getProperty(aSchemaSource)); + } catch (SAXException e) { + ; // as expected + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6309988.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,380 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.File; +import java.io.InputStream; + +import javax.xml.XMLConstants; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.w3c.dom.Document; +import org.xml.sax.SAXParseException; + +/* + * @bug 6309988 + * @summary Test elementAttributeLimit, maxOccurLimit, entityExpansionLimit. + */ +public class Bug6309988 { + + DocumentBuilderFactory dbf = null; + static boolean _isSecureMode = false; + static { + if (System.getSecurityManager() != null) { + _isSecureMode = true; + System.out.println("Security Manager is present"); + } else { + System.out.println("Security Manager is NOT present"); + } + } + + /* + * Given XML document has more than 10000 attributes. Exception is expected + */ + @Test + public void testDOMParserElementAttributeLimit() { + try { + dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder parser = dbf.newDocumentBuilder(); + Document doc = parser.parse(this.getClass().getResourceAsStream("DosTest.xml")); + Assert.fail("SAXParserException is expected, as given XML document contains more than 10000 attributes"); + } catch (SAXParseException e) { + System.out.println(e.getMessage()); + } catch (Exception e) { + Assert.fail("Exception " + e.getMessage()); + } + } + + /* + * Given XML document has more than 10000 attributes. It should report an + * error. + */ + @Test + public void testDOMNSParserElementAttributeLimit() { + try { + dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware(true); + DocumentBuilder parser = dbf.newDocumentBuilder(); + Document doc = parser.parse(this.getClass().getResourceAsStream("DosTest.xml")); + Assert.fail("SAXParserException is expected, as given XML document contains more than 10000 attributes"); + } catch (SAXParseException e) { + System.out.println(e.getMessage()); + } catch (Exception e) { + Assert.fail("Exception " + e.getMessage()); + } + } + + /* + * Given XML document has more than 10000 attributes. Parsing this XML + * document in non-secure mode, should not report any error. + */ + @Test + public void testDOMNSParserElementAttributeLimitWithoutSecureProcessing() { + if (_isSecureMode) + return; // jaxp secure feature can not be turned off when security + // manager is present + try { + dbf = DocumentBuilderFactory.newInstance(); + dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false); + dbf.setNamespaceAware(true); + DocumentBuilder parser = dbf.newDocumentBuilder(); + Document doc = parser.parse(this.getClass().getResourceAsStream("DosTest.xml")); + + } catch (SAXParseException e) { + Assert.fail(e.getMessage()); + } catch (Exception e) { + Assert.fail("Exception " + e.getMessage()); + } + } + + /* + * Before 8014530: Given XML document has 3 attributes and System property + * is set to 2. Parsing this XML document in non-secure mode, should not + * report an error. + * After 8014530: System properties will override FSP, the result of this + * test should be the same as + * testSystemElementAttributeLimitWithSecureProcessing + */ + @Test + public void testSystemElementAttributeLimitWithoutSecureProcessing() { + if (_isSecureMode) + return; // jaxp secure feature can not be turned off when security + // manager is present + try { + dbf = DocumentBuilderFactory.newInstance(); + dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false); + dbf.setNamespaceAware(true); + System.setProperty("elementAttributeLimit", "2"); + DocumentBuilder parser = dbf.newDocumentBuilder(); + Document doc = parser.parse(this.getClass().getResourceAsStream("DosTest3.xml")); + + Assert.fail("SAXParserException is expected, as given XML document contains more than 2 attributes"); + } catch (Exception e) { + String errMsg = e.getMessage(); + Throwable cause = e.getCause(); + if (cause != null) { + errMsg += cause.getMessage(); + } + if (errMsg.contains("JAXP0001")) { + // expected + } else { + Assert.fail("Unexpected error: " + e.getMessage()); + } + } finally { + System.clearProperty("elementAttributeLimit"); + } + } + + /* + * Given XML document has 3 attributes and System property is set to 2. + * Parsing this XML document in secure mode, should report an error. + */ + @Test + public void testSystemElementAttributeLimitWithSecureProcessing() { + try { + dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware(true); + System.setProperty("elementAttributeLimit", "2"); + DocumentBuilder parser = dbf.newDocumentBuilder(); + Document doc = parser.parse(this.getClass().getResourceAsStream("DosTest3.xml")); + Assert.fail("SAXParserException is expected, as given XML document contains more than 2 attributes"); + } catch (SAXParseException e) { + System.out.println(e.getMessage()); + } catch (Exception e) { + Assert.fail("Exception " + e.getMessage()); + } finally { + System.setProperty("elementAttributeLimit", ""); + } + } + + /* + * Default value for secure processing feature should be true. + */ + @Test + public void testDOMSecureProcessingDefaultValue() { + try { + dbf = DocumentBuilderFactory.newInstance(); + Assert.assertTrue(dbf.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING), "Default value for secureProcessing feature should be true"); + + } catch (Exception e) { + Assert.fail("Exception " + e.getMessage()); + } + } + + /* + * Default value for secure processing feature should be true. + */ + @Test + public void testSAXSecureProcessingDefaultValue() { + try { + SAXParserFactory spf = SAXParserFactory.newInstance(); + Assert.assertTrue(spf.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING), "Default value for secureProcessing feature should be true"); + + } catch (Exception e) { + Assert.fail("Exception " + e.getMessage()); + } + } + + /* + * This method sets system property for maxOccurLimit=2 and secure process + * feature is off. Given doument contains more than 2 elements and hence an + * error should be reported. + */ + @Test + public void testSystemMaxOccurLimitWithoutSecureProcessing() { + if (_isSecureMode) + return; // jaxp secure feature can not be turned off when security + // manager is present + try { + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false); + spf.setValidating(true); + System.setProperty("maxOccurLimit", "2"); + // Set the properties for Schema Validation + String SCHEMA_LANG = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; + String SCHEMA_TYPE = "http://www.w3.org/2001/XMLSchema"; + // Get the Schema location as a File object + File schemaFile = new File(this.getClass().getResource("toys.xsd").toURI()); + // Get the parser + SAXParser parser = spf.newSAXParser(); + parser.setProperty(SCHEMA_LANG, SCHEMA_TYPE); + parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", schemaFile); + + InputStream is = this.getClass().getResourceAsStream("toys.xml"); + MyErrorHandler eh = new MyErrorHandler(); + parser.parse(is, eh); + Assert.assertFalse(eh.errorOccured, "Not Expected Error"); + System.setProperty("maxOccurLimit", ""); + } catch (Exception e) { + Assert.fail("Exception occured: " + e.getMessage()); + } + } + + /* + * This test will take longer time to execute( abt 120sec). This method + * tries to validate a document. This document contains an element whose + * maxOccur is '3002'. Since secure processing feature is off, document + * should be parsed without any errors. + */ + @Test + public void testValidMaxOccurLimitWithOutSecureProcessing() { + if (_isSecureMode) + return; // jaxp secure feature can not be turned off when security + // manager is present + try { + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false); + spf.setValidating(true); + // Set the properties for Schema Validation + String SCHEMA_LANG = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; + String SCHEMA_TYPE = "http://www.w3.org/2001/XMLSchema"; + // Get the Schema location as a File object + File schemaFile = new File(this.getClass().getResource("toys3002.xsd").toURI()); + // Get the parser + SAXParser parser = spf.newSAXParser(); + parser.setProperty(SCHEMA_LANG, SCHEMA_TYPE); + parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", schemaFile); + + InputStream is = this.getClass().getResourceAsStream("toys.xml"); + MyErrorHandler eh = new MyErrorHandler(); + parser.parse(is, eh); + Assert.assertFalse(eh.errorOccured, "Expected Error as maxOccurLimit is exceeded"); + + } catch (Exception e) { + Assert.fail("Exception occured: " + e.getMessage()); + } + } + + /* + * Before 8014530: System property is set to 2. Given XML document has more + * than 2 entity references. Parsing this document in non-secure mode, + * should *not* report an error. + * After 8014530: System properties will override FSP, the result of this + * test should be the same as + * testSystemElementAttributeLimitWithSecureProcessing + */ + @Test + public void testSystemEntityExpansionLimitWithOutSecureProcessing() { + if (_isSecureMode) + return; // jaxp secure feature can not be turned off when security + // manager is present + try { + System.setProperty("entityExpansionLimit", "2"); + dbf = DocumentBuilderFactory.newInstance(); + dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false); + dbf.setValidating(true); + DocumentBuilder parser = dbf.newDocumentBuilder(); + Document doc = parser.parse(this.getClass().getResourceAsStream("entity.xml")); + Assert.fail("SAXParserException is expected, as given XML document contains more 2 entity references"); + } catch (Exception e) { + String errMsg = e.getMessage(); + Throwable cause = e.getCause(); + if (cause != null) { + errMsg += cause.getMessage(); + } + if (errMsg.contains("JAXP0001")) { + // expected + } else { + Assert.fail("Unexpected error: " + e.getMessage()); + } + } finally { + System.clearProperty("entityExpansionLimit"); + } + } + + /* + * System property is set to 2. Given XML document has more than 2 entity + * references. Parsing this document in secure mode, should report an error. + */ + @Test + public void testSystemEntityExpansionLimitWithSecureProcessing() { + try { + dbf = DocumentBuilderFactory.newInstance(); + dbf.setValidating(true); + System.setProperty("entityExpansionLimit", "2"); + DocumentBuilder parser = dbf.newDocumentBuilder(); + Document doc = parser.parse(this.getClass().getResourceAsStream("entity.xml")); + Assert.fail("SAXParserException is expected, as given XML document contains more 2 entity references"); + + } catch (SAXParseException e) { + System.out.println(e.getMessage()); + } catch (Exception e) { + Assert.fail("Exception " + e.getMessage()); + } finally { + System.setProperty("entityExpansionLimit", ""); + } + } + + /* + * Given XML document has more than 64000 entity references. Parsing this + * document in secure mode, should report an error. + */ + @Test + public void testEntityExpansionLimitWithSecureProcessing() { + try { + dbf = DocumentBuilderFactory.newInstance(); + dbf.setValidating(true); + DocumentBuilder parser = dbf.newDocumentBuilder(); + Document doc = parser.parse(this.getClass().getResourceAsStream("entity64K.xml")); + Assert.fail("SAXParserException is expected, as given XML document contains more 2 entity references"); + + } catch (SAXParseException e) { + System.out.println(e.getMessage()); + } catch (Exception e) { + Assert.fail("Exception " + e.getMessage()); + } finally { + System.setProperty("entityExpansionLimit", ""); + } + } + + /* + * Given XML document has more than 64000 entity references. Parsing this + * document in non-secure mode, should not report any error. + */ + @Test + public void testEntityExpansionLimitWithOutSecureProcessing() { + if (_isSecureMode) + return; // jaxp secure feature can not be turned off when security + // manager is present + try { + dbf = DocumentBuilderFactory.newInstance(); + dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, false); + dbf.setValidating(true); + DocumentBuilder parser = dbf.newDocumentBuilder(); + Document doc = parser.parse(this.getClass().getResourceAsStream("entity64K.xml")); + + } catch (SAXParseException e) { + Assert.fail("Exception " + e.getMessage()); + } catch (Exception e) { + Assert.fail("Exception " + e.getMessage()); + } finally { + System.setProperty("entityExpansionLimit", ""); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6341770.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.File; +import java.io.FileWriter; +import java.io.PrintWriter; + +import javax.xml.parsers.SAXParserFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +/* + * @bug 6341770 + * @summary Test external entity linked to non-ASCII base URL. + */ +public class Bug6341770 { + + // naming a file "aux" would fail on windows. + @Test + public void testNonAsciiURI() { + try { + File dir = File.createTempFile("sko\u0159ice", null); + dir.delete(); + dir.mkdir(); + File main = new File(dir, "main.xml"); + PrintWriter w = new PrintWriter(new FileWriter(main)); + w.println("<!DOCTYPE r [<!ENTITY aux SYSTEM \"aux1.xml\">]>"); + w.println("<r>&aux;</r>"); + w.flush(); + w.close(); + File aux = new File(dir, "aux1.xml"); + w = new PrintWriter(new FileWriter(aux)); + w.println("<x/>"); + w.flush(); + w.close(); + System.out.println("Parsing: " + main); + SAXParserFactory.newInstance().newSAXParser().parse(main, new DefaultHandler() { + public void startElement(String uri, String localname, String qname, Attributes attr) throws SAXException { + System.out.println("encountered <" + qname + ">"); + } + }); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail("Exception: " + e.getMessage()); + } + System.out.println("OK."); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6361283.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @bug 6361283 + * @summary Test SAXParser returns version as 1.1 for XML 1.1 document. + */ +public class Bug6361283 { + + @Test + public void testXMLVersion() { + try { + SAXParserFactory factory = SAXParserFactory.newInstance(); + SAXParser parser = factory.newSAXParser(); + Assert.assertTrue(factory.getFeature("http://xml.org/sax/features/use-locator2"), "use-locator2 should have value as true"); + MyDefaultHandler dh = new MyDefaultHandler(); + parser.parse(this.getClass().getResourceAsStream("catalog.xml"), dh); + Assert.assertTrue(dh.xmlVersion.equals("1.1"), "XML Document version should be 1.1"); + } catch (Exception e) { + e.printStackTrace(); + Assert.fail("Exception occured: " + e.getMessage()); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6506304Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.xml.sax.XMLReader; + +/* + * @bug 6506304 + * @summary Test MalformedURLException: unknown protocol won't be thrown when there is a space within the full path file name. + */ +public class Bug6506304Test { + public static boolean isWindows = false; + static { + if (System.getProperty("os.name").indexOf("Windows") > -1) { + isWindows = true; + } + }; + + @Test + public void testPath() throws Exception { + if (isWindows) { + try { + SAXParserFactory factory = SAXParserFactory.newInstance(); + factory.setNamespaceAware(true); + SAXParser jaxpParser = factory.newSAXParser(); + XMLReader reader = jaxpParser.getXMLReader(); + reader.parse("C:/space error/x.xml"); + System.exit(0); + } catch (Exception e) { + System.out.println(e.getMessage()); + if (e.getMessage().equalsIgnoreCase("unknown protocol: c")) { + Assert.fail("jdk5 allowed the above form"); + } else if (e.getMessage().indexOf("(The system cannot find the path specified)") > 0) { + // expected + } + } + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6518733.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.FileReader; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.xml.sax.Attributes; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +/* + * @bug 6518733 + * @summary Test SAX parser handles several attributes that each contain a newline within the attribute value. + */ +public class Bug6518733 { + + @Test + public void test() { + SAXParserFactory factory = SAXParserFactory.newInstance(); + try { + SAXParser saxParser = factory.newSAXParser(); + saxParser.parse(new InputSource(new FileReader(getClass().getResource("Bug6518733.xml").getFile())), new Handler()); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + + static class Handler extends org.xml.sax.helpers.DefaultHandler { + public void startElement(String uri, String localName, String qName, Attributes attrs) throws SAXException { + // Make sure that the value of attribute q7 is "7 G" + if (qName.equals("obj")) { + Assert.assertTrue(attrs.getValue("", "q7").equals("7 G")); + } + } + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6518733.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,32 @@ +<?xml version="1.0"?> + +<obj + +q1="1 +A" + +q2="2 +B" + +q3="3 +C" + +q4="4 +D" + +q5="5 +E" + +q6="6 +F" + +q7="7 +G" + +q8="8 +H" + +q9="9 +I" + +/>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6564400.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; + +import javax.xml.XMLConstants; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.w3c.dom.Document; +import org.w3c.dom.Node; +import org.w3c.dom.Text; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +/* + * @bug 6564400 + * @summary Test ignorable whitespace handling with schema validation. + */ +public class Bug6564400 { + private boolean sawIgnorable = false; + Schema schema = null; + + public Bug6564400(String name) { + String xsdFile = "Bug6564400.xsd"; + File schemaFile = new File(xsdFile); + + // Now attempt to load up the schema + try { + SchemaFactory schFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); + schema = schFactory.newSchema(new StreamSource(getClass().getResourceAsStream(xsdFile))); + } catch (Exception e) { + // Nevermind, bad things will happen later + } + } + + @Test + public void testDOM() throws ParserConfigurationException, SAXException, IOException { + InputStream xmlFile = getClass().getResourceAsStream("Bug6564400.xml"); + + // Set the options on the DocumentFactory to remove comments, remove + // whitespace + // and validate against the schema. + DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); + docFactory.setIgnoringComments(true); + docFactory.setIgnoringElementContentWhitespace(true); + docFactory.setSchema(schema); + + DocumentBuilder parser = docFactory.newDocumentBuilder(); + Document xmlDoc = parser.parse(xmlFile); + + boolean ok = dump(xmlDoc, true); + Assert.assertEquals(true, ok); + } + + @Test + public void testSAX() throws ParserConfigurationException, SAXException, IOException { + InputStream xmlFile = getClass().getResourceAsStream("Bug6564400.xml"); + + // Parse with SAX + SAXParserFactory saxFactory = SAXParserFactory.newInstance(); + saxFactory.setSchema(schema); + + SAXParser saxparser = saxFactory.newSAXParser(); + + sawIgnorable = false; + saxparser.parse(xmlFile, new MyHandler()); + Assert.assertEquals(true, sawIgnorable); + } + + @Test + public void testConformantDOM() throws ParserConfigurationException, SAXException, IOException { + InputStream xmlFile = getClass().getResourceAsStream("Bug6564400.xml"); + + // Set the options on the DocumentFactory to remove comments, remove + // whitespace + // and validate against the schema. + DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); + docFactory.setIgnoringComments(true); + docFactory.setIgnoringElementContentWhitespace(true); + docFactory.setSchema(schema); + docFactory.setFeature("http://java.sun.com/xml/schema/features/report-ignored-element-content-whitespace", true); + + DocumentBuilder parser = docFactory.newDocumentBuilder(); + Document xmlDoc = parser.parse(xmlFile); + + boolean ok = dump(xmlDoc, true); + Assert.assertEquals(false, ok); + } + + @Test + public void testConformantSAX() throws ParserConfigurationException, SAXException, IOException { + InputStream xmlFile = getClass().getResourceAsStream("Bug6564400.xml"); + + // Parse with SAX + SAXParserFactory saxFactory = SAXParserFactory.newInstance(); + saxFactory.setSchema(schema); + saxFactory.setFeature("http://java.sun.com/xml/schema/features/report-ignored-element-content-whitespace", true); + + SAXParser saxparser = saxFactory.newSAXParser(); + + sawIgnorable = false; + saxparser.parse(xmlFile, new MyHandler()); + Assert.assertEquals(false, sawIgnorable); + } + + private boolean dump(Node node) { + return dump(node, false); + } + + private boolean dump(Node node, boolean silent) { + return dump(node, silent, 0); + } + + private boolean dump(Node node, boolean silent, int depth) { + boolean ok = true; + if (!silent) { + for (int i = 0; i < depth; i++) { + System.out.print(" "); + } + System.out.println(node); + } + + if (node.getNodeType() == Node.TEXT_NODE) { + String text = ((Text) node).getData(); + ok = ok && text.trim().length() > 0; + } + + if (node.getNodeType() == Node.ELEMENT_NODE || node.getNodeType() == Node.DOCUMENT_NODE) { + Node child = node.getFirstChild(); + while (child != null) { + ok = ok && dump(child, silent, depth + 1); + child = child.getNextSibling(); + } + } + return ok; + } + + public class MyHandler extends DefaultHandler { + public void ignorableWhitespace(char[] ch, int start, int length) { + sawIgnorable = true; + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6564400.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,4 @@ +<Person> + <FirstName>Doofus</FirstName><!-- MONKEY --> + <LastName>McGee</LastName> +</Person>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6564400.xsd Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,9 @@ +<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'> + <xsd:element name='Person' type='PersonType'/> + <xsd:complexType name='PersonType'> + <xsd:sequence> + <xsd:element name='FirstName' type='xsd:string'/> + <xsd:element name='LastName' type='xsd:string'/> + </xsd:sequence> + </xsd:complexType> +</xsd:schema>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6573786.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.InputStream; +import java.io.StringBufferInputStream; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @bug 6573786 + * @summary Test parser error messages are formatted. + */ +public class Bug6573786 { + String _cache = ""; + + @Test + public void test() { + final String XML = "" + "<?xml version='1.0' encoding='UTF-8' standalone='bad_value' ?>" + "<root />"; + + runTest(XML); + + } + + @Test + public void test1() { + final String XML = "" + "<?xml version='1.0' standalone='bad_value' encoding='UTF-8' ?>" + "<root />"; + runTest(XML); + + } + + void runTest(String xmlString) { + Bug6573786ErrorHandler handler = new Bug6573786ErrorHandler(); + try { + InputStream is = new StringBufferInputStream(xmlString); + SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); + parser.parse(is, handler); + } catch (Exception e) { + if (handler.fail) { + Assert.fail("The value of standalone attribute should be merged into the error message."); + } + } + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6573786ErrorHandler.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; +import org.xml.sax.helpers.DefaultHandler; + +public class Bug6573786ErrorHandler extends DefaultHandler { + public boolean fail = false; + + public void fatalError(SAXParseException e) throws SAXException { + System.out.println(e.getMessage()); + if (e.getMessage().indexOf("bad_value") < 0) { + fail = true; + } + } // fatalError () + + public void error(SAXParseException e) throws SAXException { + System.out.println(e.getMessage()); + } // error () + + public void warning(SAXParseException e) throws SAXException { + System.out.println(e.getMessage()); + } // warning () +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6594813.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.StringReader; +import java.io.StringWriter; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.sax.SAXSource; +import javax.xml.transform.stream.StreamResult; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.xml.sax.InputSource; +import org.xml.sax.helpers.DefaultHandler; + +/* + * @bug 6594813 + * @summary Test SAXParser output is wellformed with name space. + */ +public class Bug6594813 { + + public Bug6594813(String name) { + } + + private static final String TESTXML = "<?xml version='1.0' ?>\n" + + "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ns1='http://faulttestservice.org/wsdl'>\n" + + "<soapenv:Body>\n" + "<soapenv:Fault xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>\n" + "<faultcode>\n" + + "soapenv:Server</faultcode>\n" + "<faultstring>\n" + "com.sun.ts.tests.jaxws.sharedwebservices.faultservice.DummyException</faultstring>\n" + + "<detail>\n" + "<ns1:DummyException>\n" + "<dummyField1>\n" + "dummyString1</dummyField1>\n" + "<dummyField2>\n" + "dummyString2</dummyField2>\n" + + "</ns1:DummyException>\n" + "</detail>\n" + "</soapenv:Fault>\n" + "</soapenv:Body>\n" + "</soapenv:Envelope>\n"; + + // simplest XML to re-declare same prefix/namespace mappings + private static final String SIMPLE_TESTXML = "<?xml version='1.0' ?>\n" + "<prefix:ElementName xmlns:prefix='URI'>\n" + + "<prefix:ElementName xmlns:prefix='URI'>\n" + "</prefix:ElementName>\n" + "</prefix:ElementName>\n"; + + private String runTransform(SAXParser sp) throws Exception { + // Run identity transform using SAX parser + SAXSource src = new SAXSource(sp.getXMLReader(), new InputSource(new StringReader(TESTXML))); + Transformer transformer = TransformerFactory.newInstance().newTransformer(); + StringWriter sw = new StringWriter(); + transformer.transform(src, new StreamResult(sw)); + + String result = sw.getBuffer().toString(); + // System.out.println(result); + return result; + } + + private void checkWellFormedness(String xml) throws Exception { + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setNamespaceAware(true); // Same as default + spf.setFeature("http://xml.org/sax/features/namespace-prefixes", true); + SAXParser sp = spf.newSAXParser(); + + // Re-parse output to make sure that it is well formed + sp.parse(new InputSource(new StringReader(xml)), new DefaultHandler()); + } + + /** + * Test an identity transform of an XML document with NS decls using a + * non-ns-aware parser. Output result to a StreamSource. Set ns-awareness to + * FALSE and prefixes to FALSE. + */ + @Test + public void testXMLNoNsAwareStreamResult1() { + try { + // Create SAX parser *without* enabling ns + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setNamespaceAware(false); // Same as default + spf.setFeature("http://xml.org/sax/features/namespace-prefixes", false); + SAXParser sp = spf.newSAXParser(); + + // Make sure that the output is well formed + String xml = runTransform(sp); + checkWellFormedness(xml); + } catch (Throwable ex) { + Assert.fail(ex.toString()); + } + } + + /** + * Test an identity transform of an XML document with NS decls using a + * non-ns-aware parser. Output result to a StreamSource. Set ns-awareness to + * FALSE and prefixes to TRUE. + */ + @Test + public void testXMLNoNsAwareStreamResult2() { + try { + // Create SAX parser *without* enabling ns + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setNamespaceAware(false); // Same as default + spf.setFeature("http://xml.org/sax/features/namespace-prefixes", true); + SAXParser sp = spf.newSAXParser(); + + // Make sure that the output is well formed + String xml = runTransform(sp); + checkWellFormedness(xml); + } catch (Throwable ex) { + Assert.fail(ex.toString()); + } + } + + /** + * Test an identity transform of an XML document with NS decls using a + * non-ns-aware parser. Output result to a StreamSource. Set ns-awareness to + * TRUE and prefixes to FALSE. + */ + @Test + public void testXMLNoNsAwareStreamResult3() { + try { + // Create SAX parser *without* enabling ns + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setNamespaceAware(true); // Same as default + spf.setFeature("http://xml.org/sax/features/namespace-prefixes", false); + SAXParser sp = spf.newSAXParser(); + + // Make sure that the output is well formed + String xml = runTransform(sp); + checkWellFormedness(xml); + } catch (Throwable ex) { + Assert.fail(ex.toString()); + } + } + + /** + * Test an identity transform of an XML document with NS decls using a + * non-ns-aware parser. Output result to a StreamSource. Set ns-awareness to + * TRUE and prefixes to TRUE. + */ + @Test + public void testXMLNoNsAwareStreamResult4() { + try { + // Create SAX parser *without* enabling ns + SAXParserFactory spf = SAXParserFactory.newInstance(); + spf.setNamespaceAware(true); // Same as default + spf.setFeature("http://xml.org/sax/features/namespace-prefixes", true); + SAXParser sp = spf.newSAXParser(); + + // Make sure that the output is well formed + String xml = runTransform(sp); + checkWellFormedness(xml); + } catch (Throwable ex) { + Assert.fail(ex.toString()); + } + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841.dtd Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,3 @@ +<!ENTITY % label.qname "IGNORE" > +<!ENTITY % xhtml PUBLIC "-//W3C//DTD XHTML 1.1//EN" "Bug6608841_xhtml11-flat.dtd"> +%xhtml;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.File; +import java.io.IOException; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.testng.annotations.Test; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +/* + * @bug 6608841 + * @summary Test SAX parses external parameter entity. + */ +public class Bug6608841 { + public Bug6608841(String name) { + } + + @Test + public void testParse() throws ParserConfigurationException, SAXException, IOException { + String file = getClass().getResource("Bug6608841.xml").getFile(); + SAXParserFactory spf = SAXParserFactory.newInstance(); + SAXParser parser = spf.newSAXParser(); + parser.parse(new File(file), new MyHandler()); + } + + public class MyHandler extends DefaultHandler { + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,10 @@ +<!DOCTYPE html SYSTEM "Bug6608841.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Some Title</title> +</head> +<body> +<h1>Some Title</h1> +<p>This is a test. This is only a test.</p> +</body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6608841_xhtml11-flat.dtd Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,1 @@ +<?doc type="doctype" role="title" { XHTML 1.1 } ?>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6690015.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.FileInputStream; + +import javax.xml.parsers.DocumentBuilderFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; + +/* + * @bug 6518733 + * @summary Test SAX parser handles several attributes with newlines. + */ +public class Bug6690015 { + + public Bug6690015() { + } + + @Test + public void test() { + try { + FileInputStream fis = new FileInputStream(getClass().getResource("bug6690015.xml").getFile()); + + Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(fis)); + Element root = doc.getDocumentElement(); + NodeList textnodes = root.getElementsByTagName("text"); + int len = textnodes.getLength(); + int index = 0; + int attindex = 0; + int attrlen = 0; + NamedNodeMap attrs = null; + + while (index < len) { + Element te = (Element) textnodes.item(index); + attrs = te.getAttributes(); + attrlen = attrs.getLength(); + attindex = 0; + Node node = null; + + while (attindex < attrlen) { + node = attrs.item(attindex); + System.out.println("attr: " + node.getNodeName() + " is shown holding value: " + node.getNodeValue()); + attindex++; + } + index++; + System.out.println("-------------"); + } + fis.close(); + } catch (Exception e) { + Assert.fail("Exception: " + e.getMessage()); + } + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6760982.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.File; +import java.io.FileReader; +import java.io.Reader; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; + +/* + * @bug 6518733 + * @summary Test SAX parser handles several attributes with containing ">". + */ +public class Bug6760982 { + + @Test + public void test() { + try { + Document xmlDoc = _Parse(new File(getClass().getResource("bug6760982.xml").getFile())); + Node node = xmlDoc.getDocumentElement(); + + _ProcessNode(node, 0); + _Flush(); + } catch (Exception e) { + _ErrPrintln("Exception: " + e.toString()); + Assert.fail("Exception: " + e.getMessage()); + } + } + + private static void _Flush() { + System.out.flush(); + System.err.flush(); + } + + private static void _Println(String str, int level) { + for (int i = 0; i < level; i++) + System.out.print(" "); + + System.out.println(str); + System.out.flush(); + } + + private static void _ErrPrintln(String aStr) { + System.out.flush(); + System.err.println(aStr); + System.err.flush(); + } + + private static Document _Parse(File f) throws Exception { + FileReader rd = new FileReader(f); + Document doc = _Parse(rd); + + rd.close(); + + return doc; + } + + private static Document _Parse(Reader src) throws Exception { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + + dbf.setValidating(false); // to improve performance + + DocumentBuilder xmlParser = dbf.newDocumentBuilder(); + InputSource is = new InputSource(src); + + return xmlParser.parse(is); + } + + private static void _PrintAttributes(Node n, int level) { + NamedNodeMap nnmap = n.getAttributes(); + + if (nnmap != null && nnmap.getLength() > 0) { + _Println("<attribs> (" + nnmap.getClass() + "):", level + 1); + + for (int i = 0; i < nnmap.getLength(); i++) { + Node an = nnmap.item(i); + + String nameStr = an.getNodeName(); + String valueStr = an.getNodeValue(); + + if (valueStr != "") + nameStr += " = " + valueStr; + + _Println(nameStr, level + 2); + } + } + } + + private static void _ProcessChildren(Node n, int level) throws Exception { + NodeList nlist = n.getChildNodes(); + + if (nlist != null) + for (int i = 0; i < nlist.getLength(); i++) + _ProcessNode(nlist.item(i), level + 1); + } + + private static void _ProcessNode(Node n, int level) throws Exception { + n.getAttributes(); + n.getChildNodes(); + + // At this point, for JVM 1.6 and Xerces <= 1.3.1, + // Test-XML.xml::mytest:Y's attribute is (already) bad. + + switch (n.getNodeType()) { + + case Node.TEXT_NODE: + String str = n.getNodeValue().trim(); + + /* ...Only print non-empty strings... */ + if (str.length() > 0) { + String valStr = n.getNodeValue(); + + _Println(valStr, level); + } + break; + + case Node.COMMENT_NODE: + break; + + default: { + String nodeNameStr = n.getNodeName(); + + _Println(nodeNameStr + " (" + n.getClass() + "):", level); + + /* ...Print children... */ + _ProcessChildren(n, level); + + /* ...Print optional node attributes... */ + _PrintAttributes(n, level); + } + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug6849942Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.ByteArrayInputStream; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.w3c.dom.Document; +import org.w3c.dom.ProcessingInstruction; +import org.xml.sax.InputSource; + +/* + * @bug 6849942 + * @summary Test parsing an XML that starts with a processing instruction and no prolog. + */ +public class Bug6849942Test { + + @Test + public void test() throws Exception { + try { + ByteArrayInputStream bais = new ByteArrayInputStream("<?xmltarget foo?><test></test>".getBytes()); + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilder xmlParser = factory.newDocumentBuilder(); + // DOMParser p = new DOMParser(); + Document document = xmlParser.parse(new InputSource(bais)); + String result = ((ProcessingInstruction) document.getFirstChild()).getData(); + System.out.println(result); + if (!result.equalsIgnoreCase("foo")) { + Assert.fail("missing PI data"); + } + + } catch (Exception e) { + } + } + + @Test + public void testWProlog() throws Exception { + try { + ByteArrayInputStream bais = new ByteArrayInputStream("<?xml version=\"1.1\" encoding=\"UTF-8\"?><?xmltarget foo?><test></test>".getBytes()); + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + DocumentBuilder xmlParser = factory.newDocumentBuilder(); + // DOMParser p = new DOMParser(); + Document document = xmlParser.parse(new InputSource(bais)); + String result = ((ProcessingInstruction) document.getFirstChild()).getData(); + System.out.println(result); + if (!result.equalsIgnoreCase("foo")) { + Assert.fail("missing PI data"); + } + } catch (Exception e) { + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608.dtd Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,1 @@ +<!ELEMENT arg (#PCDATA)>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Document : test1.xml + Created on : 2012/04/13, 18:21 + Author : 10385373 + Description: + Purpose of the document follows. +--> + +<root> + +</root>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.File; +import java.io.IOException; + +import org.testng.Assert; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; +import org.w3c.dom.Document; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; +import org.xml.sax.helpers.DefaultHandler; + +/* + * @bug 7157608 + * @summary Test feature standard-uri-conformant works. + */ +public class Bug7157608Test { + public static boolean isWindows = false; + static { + if (System.getProperty("os.name").indexOf("Windows") > -1) { + isWindows = true; + } + }; + + String xml1, xml2; + + @BeforeMethod + protected void setUp() throws IOException { + File file1 = new File(getClass().getResource("Bug7157608.xml").getFile()); + xml1 = file1.getPath().replace("\\", "\\\\"); + File file2 = new File(getClass().getResource("Bug7157608_1.xml").getFile()); + xml2 = file2.getPath(); + } + + // case 1 + // standard-uri-confomant is false + // dtd-validation is false + @Test + public void test1() { + if (isWindows) { + try { + ParserSettings ps = new ParserSettings(); + + DocumentBuilder db = getDocumentBuilder(ps); + InputSource is = new InputSource(); + is.setSystemId(xml1); + Document doc = db.parse(is); + System.out.println("test1() :OK"); + } catch (Exception e) { + Assert.fail("test1() :NG"); + + } + } + } + + // case 2 + // standard-uri-confomant is false + // dtd-validation is true + @Test + public void test2() { + if (isWindows) { + try { + ParserSettings ps = new ParserSettings(); + ps.validating = true; + + DocumentBuilder db = getDocumentBuilder(ps); + InputSource is = new InputSource(xml2); + Document doc = db.parse(is); + System.out.println("test2() :OK"); + } catch (Exception e) { + Assert.fail("test2() :NG"); + // logger.info(e.getMessage()); + } + } + } + + // case 3 + // standard-uri-confomant is true + @Test + public void test3() { + if (isWindows) { + try { + ParserSettings ps = new ParserSettings(); + ps.standardUriConformant = true; + + DocumentBuilder db = getDocumentBuilder(ps); + InputSource is = new InputSource(); + is.setSystemId(xml1); + Document doc = db.parse(is); + Assert.fail("test3() :NG"); + } catch (IOException e) { + String returnedErr = e.getMessage(); + String expectedStr = "Opaque part contains invalid character"; + + if (returnedErr.indexOf(expectedStr) >= 0) { + System.out.println("test3() :OK"); + } else { + Assert.fail("test3() :NG"); + } + } catch (Exception e) { + System.out.println("test3() :NG"); + } + } + } + + // case 4 + // standard-uri-confomant is true + // dtd-validation is true + @Test + public void test4() { + if (isWindows) { + try { + ParserSettings ps = new ParserSettings(); + ps.standardUriConformant = true; + ps.validating = true; + + DocumentBuilder db = getDocumentBuilder(ps); + InputSource is = new InputSource(xml2); + Document doc = db.parse(is); + Assert.fail("test4() :NG"); + } catch (IOException e) { + String returnedErr = e.getMessage(); + String expectedStr = "Opaque part contains invalid character"; + + if (returnedErr.indexOf(expectedStr) >= 0) { + System.out.println("test3() :OK"); + } else { + Assert.fail("test3() :NG"); + } + } catch (Exception e) { + Assert.fail("test4() :NG"); + } + } + } + + public DocumentBuilder getDocumentBuilder(ParserSettings ps) { + DocumentBuilder db = null; + try { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + if (ps.standardUriConformant) { + dbf.setFeature("http://apache.org/xml/features/standard-uri-conformant", true); + } + dbf.setValidating(ps.validating); + db = dbf.newDocumentBuilder(); + db.setErrorHandler(new MyHandler()); + } catch (Exception e) { + Assert.fail("standard-uri-conformant not recognized"); + } + return db; + } + + class MyHandler extends DefaultHandler { + @Override + public void warning(SAXParseException e) throws SAXException { + printDetail("**Warning**", e); + } + + @Override + public void error(SAXParseException e) throws SAXException { + printDetail("**Error**", e); + throw new SAXException("Error encountered"); + } + + @Override + public void fatalError(SAXParseException e) throws SAXException { + printDetail("**Fatal Error**", e); + throw new SAXException("Fatal Error encountered"); + } + + public void printDetail(String msg, SAXParseException e) { + System.out.println(msg); + System.out.println(e.getMessage()); + System.out.println(" Line: " + e.getLineNumber()); + System.out.println(" Column: " + e.getColumnNumber()); + System.out.println(" URI: " + e.getSystemId()); + } + + } + + class ParserSettings { + boolean standardUriConformant = false; + boolean validating = false; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7157608_1.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + Document : test2.xml + Created on : 2012/04/13, 20:08 + Author : 10385373 + Description: + Purpose of the document follows. +--> + +<!DOCTYPE arg PUBLIC '-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN' 'Bug7157608.dtd'> +<arg> +test +</arg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug7166896Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.IOException; + +import org.testng.Assert; +import org.testng.annotations.Test; +import org.w3c.dom.Document; +import org.xml.sax.SAXException; + +/* + * @bug 7166896 + * @summary Test DocumentBuilder.parse(String uri) supports IPv6 format. + */ +public class Bug7166896Test { + + @Test + public void test() throws Exception { + final String url = "http://[fe80::la03:73ff:fead:f7b0]/note.xml"; + final DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance(); + domFactory.setNamespaceAware(true); + DocumentBuilder builder; + Document doc = null; + System.out.println("URL is " + url); + try { + builder = domFactory.newDocumentBuilder(); + // here comes the MalformedURLException. With Java6 / 7 it looks + // like this: + // java.net.MalformedURLException: For input string: + // ":la03:73ff:fead:f7b0%5D" + // which is not fine. + // with xerces 2.11.0 it complains about a non-existing host, which + // is fine + System.out.println("passing URL to DocumentBuilder.parse()"); + doc = builder.parse(url); + + } catch (SAXException e) { + e.printStackTrace(); + } catch (IOException e) { + String em = e.getMessage(); + System.err.println("Error message: " + em); + if (em.contains("For input string: \":la03:73ff:fead:f7b0%5D\"")) { + Assert.fail("failed to accept IPv6 address"); + } + } catch (ParserConfigurationException e) { + e.printStackTrace(); + } + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/Bug8003147Test.java Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2014, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package javax.xml.parsers; + +import java.io.FileOutputStream; +import java.util.ArrayList; + +import org.testng.Assert; +import org.testng.annotations.Test; + +import com.sun.org.apache.bcel.internal.classfile.ClassParser; +import com.sun.org.apache.bcel.internal.classfile.ConstantClass; +import com.sun.org.apache.bcel.internal.classfile.ConstantPool; +import com.sun.org.apache.bcel.internal.classfile.ConstantUtf8; +import com.sun.org.apache.bcel.internal.classfile.JavaClass; +import com.sun.org.apache.bcel.internal.classfile.Method; +import com.sun.org.apache.bcel.internal.generic.ClassGen; +import com.sun.org.apache.bcel.internal.generic.MethodGen; + +/* + * @bug 8003147 + * @summary Test port fix for BCEL bug 39695. + */ +public class Bug8003147Test { + + @Test + public void test() throws Exception { + String classfile = getClass().getResource("Bug8003147Test.class").getPath(); + JavaClass jc = new ClassParser(classfile).parse(); + // rename class + ConstantPool cp = jc.getConstantPool(); + int cpIndex = ((ConstantClass) cp.getConstant(jc.getClassNameIndex())).getNameIndex(); + cp.setConstant(cpIndex, new ConstantUtf8("javax/xml/parsers/Bug8003147TestPrime")); + ClassGen gen = new ClassGen(jc); + Method[] methods = jc.getMethods(); + int index; + for (index = 0; index < methods.length; index++) { + if (methods[index].getName().equals("doSomething")) { + break; + } + } + Method m = methods[index]; + MethodGen mg = new MethodGen(m, gen.getClassName(), gen.getConstantPool()); + gen.replaceMethod(m, mg.getMethod()); + String path = classfile.replace("Bug8003147Test", "Bug8003147TestPrime"); + gen.getJavaClass().dump(new FileOutputStream(path)); + + try { + Class.forName("javax.xml.parsers.Bug8003147TestPrime"); + } catch (ClassFormatError cfe) { + cfe.printStackTrace(); + Assert.fail("modified version of class does not pass verification"); + } + } + + public void doSomething(double d, ArrayList<Integer> list) { + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/javax/xml/parsers/DosTest.xml Thu Dec 04 15:22:42 2014 -0800 @@ -0,0 +1,2031 @@ +<?xml version="1.0" encoding="UTF-8"?> +<personnel> + +<person id="Big.Boss" A100 = "" +A101 = "" A102 = "" A103 = "" A104 = "" A105 = "" A106 = "" A107 = "" A108 = "" A109 = "" A110 = "" +A111 = "" A112 = "" A113 = "" A114 = "" A115 = "" A116 = "" A117 = "" A118 = "" A119 = "" A120 = "" +A121 = "" A122 = "" A123 = "" A124 = "" A125 = "" A126 = "" A127 = "" A128 = "" A129 = "" A130 = "" +A131 = "" A132 = "" A133 = "" A134 = "" A135 = "" A136 = "" A137 = "" A138 = "" A139 = "" A140 = "" +A141 = "" A142 = "" A143 = "" A144 = "" A145 = "" A146 = "" A147 = "" A148 = "" A149 = "" A150 = "" +A151 = "" A152 = "" A153 = "" A154 = "" A155 = "" A156 = "" A157 = "" A158 = "" A159 = "" A160 = "" +A161 = "" A162 = "" A163 = "" A164 = "" A165 = "" A166 = "" A167 = "" A168 = "" A169 = "" A170 = "" +A171 = "" A172 = "" A173 = "" A174 = "" A175 = "" A176 = "" A177 = "" A178 = "" A179 = "" A180 = "" +A181 = "" A182 = "" A183 = "" A184 = "" A185 = "" A186 = "" A187 = "" A188 = "" A189 = "" A190 = "" +A191 = "" A192 = "" A193 = "" A194 = "" A195 = "" A196 = "" A197 = "" A198 = "" A199 = "" A200 = "" +A201 = "" A202 = "" A203 = "" A204 = "" A205 = "" A206 = "" A207 = "" A208 = "" A209 = "" A210 = "" +A211 = "" A212 = "" A213 = "" A214 = "" A215 = "" A216 = "" A217 = "" A218 = "" A219 = "" A220 = "" +A221 = "" A222 = "" A223 = "" A224 = "" A225 = "" A226 = "" A227 = "" A228 = "" A229 = "" A230 = "" +A231 = "" A232 = "" A233 = "" A234 = "" A235 = "" A236 = "" A237 = "" A238 = "" A239 = "" A240 = "" +A241 = "" A242 = "" A243 = "" A244 = "" A245 = "" A246 = "" A247 = "" A248 = "" A249 = "" A250 = "" +A251 = "" A252 = "" A253 = "" A254 = "" A255 = "" A256 = "" A257 = "" A258 = "" A259 = "" A260 = "" +A261 = "" A262 = "" A263 = "" A264 = "" A265 = "" A266 = "" A267 = "" A268 = "" A269 = "" A270 = "" +A271 = "" A272 = "" A273 = "" A274 = "" A275 = "" A276 = "" A277 = "" A278 = "" A279 = "" A280 = "" +A281 = "" A282 = "" A283 = "" A284 = "" A285 = "" A286 = "" A287 = "" A288 = "" A289 = "" A290 = "" +A291 = "" A292 = "" A293 = "" A294 = "" A295 = "" A296 = "" A297 = "" A298 = "" A299 = "" A300 = "" +A301 = "" A302 = "" A303 = "" A304 = "" A305 = "" A306 = "" A307 = "" A308 = "" A309 = "" A310 = "" +A311 = "" A312 = "" A313 = "" A314 = "" A315 = "" A316 = "" A317 = "" A318 = "" A319 = "" A320 = "" +A321 = "" A322 = "" A323 = "" A324 = "" A325 = "" A326 = "" A327 = "" A328 = "" A329 = "" A330 = "" +A331 = "" A332 = "" A333 = "" A334 = "" A335 = "" A336 = "" A337 = "" A338 = "" A339 = "" A340 = "" +A341 = "" A342 = "" A343 = "" A344 = "" A345 = "" A346 = "" A347 = "" A348 = "" A349 = "" A350 = "" +A351 = "" A352 = "" A353 = "" A354 = "" A355 = "" A356 = "" A357 = "" A358 = "" A359 = "" A360 = "" +A361 = "" A362 = "" A363 = "" A364 = "" A365 = "" A366 = "" A367 = "" A368 = "" A369 = "" A370 = "" +A371 = "" A372 = "" A373 = "" A374 = "" A375 = "" A376 = "" A377 = "" A378 = "" A379 = "" A380 = "" +A381 = "" A382 = "" A383 = "" A384 = "" A385 = "" A386 = "" A387 = "" A388 = "" A389 = "" A390 = "" +A391 = "" A392 = "" A393 = "" A394 = "" A395 = "" A396 = "" A397 = "" A398 = "" A399 = "" A400 = "" +A401 = "" A402 = "" A403 = "" A404 = "" A405 = "" A406 = "" A407 = "" A408 = "" A409 = "" A410 = "" +A411 = "" A412 = "" A413 = "" A414 = "" A415 = "" A416 = "" A417 = "" A418 = "" A419 = "" A420 = "" +A421 = "" A422 = "" A423 = "" A424 = "" A425 = "" A426 = "" A427 = "" A428 = "" A429 = "" A430 = "" +A431 = "" A432 = "" A433 = "" A434 = "" A435 = "" A436 = "" A437 = "" A438 = "" A439 = "" A440 = "" +A441 = "" A442 = "" A443 = "" A444 = "" A445 = "" A446 = "" A447 = "" A448 = "" A449 = "" A450 = "" +A451 = "" A452 = "" A453 = "" A454 = "" A455 = "" A456 = "" A457 = "" A458 = "" A459 = "" A460 = "" +A461 = "" A462 = "" A463 = "" A464 = "" A465 = "" A466 = "" A467 = "" A468 = "" A469 = "" A470 = "" +A471 = "" A472 = "" A473 = "" A474 = "" A475 = "" A476 = "" A477 = "" A478 = "" A479 = "" A480 = "" +A481 = "" A482 = "" A483 = "" A484 = "" A485 = "" A486 = "" A487 = "" A488 = "" A489 = "" A490 = "" +A491 = "" A492 = "" A493 = "" A494 = "" A495 = "" A496 = "" A497 = "" A498 = "" A499 = "" A500 = "" +A501 = "" A502 = "" A503 = "" A504 = "" A505 = "" A506 = "" A507 = "" A508 = "" A509 = "" A510 = "" +A511 = "" A512 = "" A513 = "" A514 = "" A515 = "" A516 = "" A517 = "" A518 = "" A519 = "" A520 = "" +A521 = "" A522 = "" A523 = "" A524 = "" A525 = "" A526 = "" A527 = "" A528 = "" A529 = "" A530 = "" +A531 = "" A532 = "" A533 = "" A534 = "" A535 = "" A536 = "" A537 = "" A538 = "" A539 = "" A540 = "" +A541 = "" A542 = "" A543 = "" A544 = "" A545 = "" A546 = "" A547 = "" A548 = "" A549 = "" A550 = "" +A551 = "" A552 = "" A553 = "" A554 = "" A555 = "" A556 = "" A557 = "" A558 = "" A559 = "" A560 = "" +A561 = "" A562 = "" A563 = "" A564 = "" A565 = "" A566 = "" A567 = "" A568 = "" A569 = "" A570 = "" +A571 = "" A572 = "" A573 = "" A574 = "" A575 = "" A576 = "" A577 = "" A578 = "" A579 = "" A580 = "" +A581 = "" A582 = "" A583 = "" A584 = "" A585 = "" A586 = "" A587 = "" A588 = "" A589 = "" A590 = "" +A591 = "" A592 = "" A593 = "" A594 = "" A595 = "" A596 = "" A597 = "" A598 = "" A599 = "" A600 = "" +A601 = "" A602 = "" A603 = "" A604 = "" A605 = "" A606 = "" A607 = "" A608 = "" A609 = "" A610 = "" +A611 = "" A612 = "" A613 = "" A614 = "" A615 = "" A616 = "" A617 = "" A618 = "" A619 = "" A620 = "" +A621 = "" A622 = "" A623 = "" A624 = "" A625 = "" A626 = "" A627 = "" A628 = "" A629 = "" A630 = "" +A631 = "" A632 = "" A633 = "" A634 = "" A635 = "" A636 = "" A637 = "" A638 = "" A639 = "" A640 = "" +A641 = "" A642 = "" A643 = "" A644 = "" A645 = "" A646 = "" A647 = "" A648 = "" A649 = "" A650 = "" +A651 = "" A652 = "" A653 = "" A654 = "" A655 = "" A656 = "" A657 = "" A658 = "" A659 = "" A660 = "" +A661 = "" A662 = "" A663 = "" A664 = "" A665 = "" A666 = "" A667 = "" A668 = "" A669 = "" A670 = "" +A671 = "" A672 = "" A673 = "" A674 = "" A675 = "" A676 = "" A677 = "" A678 = "" A679 = "" A680 = "" +A681 = "" A682 = "" A683 = "" A684 = "" A685 = "" A686 = "" A687 = "" A688 = "" A689 = "" A690 = "" +A691 = "" A692 = "" A693 = "" A694 = "" A695 = "" A696 = "" A697 = "" A698 = "" A699 = "" A700 = "" +A701 = "" A702 = "" A703 = "" A704 = "" A705 = "" A706 = "" A707 = "" A708 = "" A709 = "" A710 = "" +A711 = "" A712 = "" A713 = "" A714 = "" A715 = "" A716 = "" A717 = "" A718 = "" A719 = "" A720 = "" +A721 = "" A722 = "" A723 = "" A724 = "" A725 = "" A726 = "" A727 = "" A728 = "" A729 = "" A730 = "" +A731 = "" A732 = "" A733 = "" A734 = "" A735 = "" A736 = "" A737 = "" A738 = "" A739 = "" A740 = "" +A741 = "" A742 = "" A743 = "" A744 = "" A745 = "" A746 = "" A747 = "" A748 = "" A749 = "" A750 = "" +A751 = "" A752 = "" A753 = "" A754 = "" A755 = "" A756 = "" A757 = "" A758 = "" A759 = "" A760 = "" +A761 = "" A762 = "" A763 = "" A764 = "" A765 = "" A766 = "" A767 = "" A768 = "" A769 = "" A770 = "" +A771 = "" A772 = "" A773 = "" A774 = "" A775 = "" A776 = "" A777 = "" A778 = "" A779 = "" A780 = "" +A781 = "" A782 = "" A783 = "" A784 = "" A785 = "" A786 = "" A787 = "" A788 = "" A789 = "" A790 = "" +A791 = "" A792 = "" A793 = "" A794 = "" A795 = "" A796 = "" A797 = "" A798 = "" A799 = "" A800 = "" +A801 = "" A802 = "" A803 = "" A804 = "" A805 = "" A806 = "" A807 = "" A808 = "" A809 = "" A810 = "" +A811 = "" A812 = "" A813 = "" A814 = "" A815 = "" A816 = "" A817 = "" A818 = "" A819 = "" A820 = "" +A821 = "" A822 = "" A823 = "" A824 = "" A825 = "" A826 = "" A827 = "" A828 = "" A829 = "" A830 = "" +A831 = "" A832 = "" A833 = "" A834 = "" A835 = "" A836 = "" A837 = "" A838 = "" A839 = "" A840 = "" +A841 = "" A842 = "" A843 = "" A844 = "" A845 = "" A846 = "" A847 = "" A848 = "" A849 = "" A850 = "" +A851 = "" A852 = "" A853 = "" A854 = "" A855 = "" A856 = "" A857 = "" A858 = "" A859 = "" A860 = "" +A861 = "" A862 = "" A863 = "" A864 = "" A865 = "" A866 = "" A867 = "" A868 = "" A869 = "" A870 = "" +A871 = "" A872 = "" A873 = "" A874 = "" A875 = "" A876 = "" A877 = "" A878 = "" A879 = "" A880 = "" +A881 = "" A882 = "" A883 = "" A884 = "" A885 = "" A886 = "" A887 = "" A888 = "" A889 = "" A890 = "" +A891 = "" A892 = "" A893 = "" A894 = "" A895 = "" A896 = "" A897 = "" A898 = "" A899 = "" A900 = "" +A901 = "" A902 = "" A903 = "" A904 = "" A905 = "" A906 = "" A907 = "" A908 = "" A909 = "" A910 = "" +A911 = "" A912 = "" A913 = "" A914 = "" A915 = "" A916 = "" A917 = "" A918 = "" A919 = "" A920 = "" +A921 = "" A922 = "" A923 = "" A924 = "" A925 = "" A926 = "" A927 = "" A928 = "" A929 = "" A930 = "" +A931 = "" A932 = "" A933 = "" A934 = "" A935 = "" A936 = "" A937 = "" A938 = "" A939 = "" A940 = "" +A941 = "" A942 = "" A943 = "" A944 = "" A945 = "" A946 = "" A947 = "" A948 = "" A949 = "" A950 = "" +A951 = "" A952 = "" A953 = "" A954 = "" A955 = "" A956 = "" A957 = "" A958 = "" A959 = "" A960 = "" +A961 = "" A962 = "" A963 = "" A964 = "" A965 = "" A966 = "" A967 = "" A968 = "" A969 = "" A970 = "" +A971 = "" A972 = "" A973 = "" A974 = "" A975 = "" A976 = "" A977 = "" A978 = "" A979 = "" A980 = "" +A981 = "" A982 = "" A983 = "" A984 = "" A985 = "" A986 = "" A987 = "" A988 = "" A989 = "" A990 = "" +A991 = "" A992 = "" A993 = "" A994 = "" A995 = "" A996 = "" A997 = "" A998 = "" A999 = "" A1000 = "" +A1001 = "" A1002 = "" A1003 = "" A1004 = "" A1005 = "" A1006 = "" A1007 = "" A1008 = "" A1009 = "" A1010 = "" +A1011 = "" A1012 = "" A1013 = "" A1014 = "" A1015 = "" A1016 = "" A1017 = "" A1018 = "" A1019 = "" A1020 = "" +A1021 = "" A1022 = "" A1023 = "" A1024 = "" A1025 = "" A1026 = "" A1027 = "" A1028 = "" A1029 = "" A1030 = "" +A1031 = "" A1032 = "" A1033 = "" A1034 = "" A1035 = "" A1036 = "" A1037 = "" A1038 = "" A1039 = "" A1040 = "" +A1041 = "" A1042 = "" A1043 = "" A1044 = "" A1045 = "" A1046 = "" A1047 = "" A1048 = "" A1049 = "" A1050 = "" +A1051 = "" A1052 = "" A1053 = "" A1054 = "" A1055 = "" A1056 = "" A1057 = "" A1058 = "" A1059 = "" A1060 = "" +A1061 = "" A1062 = "" A1063 = "" A1064 = "" A1065 = "" A1066 = "" A1067 = "" A1068 = "" A1069 = "" A1070 = "" +A1071 = "" A1072 = "" A1073 = "" A1074 = "" A1075 = "" A1076 = "" A1077 = "" A1078 = "" A1079 = "" A1080 = "" +A1081 = "" A1082 = "" A1083 = "" A1084 = "" A1085 = "" A1086 = "" A1087 = "" A1088 = "" A1089 = "" A1090 = "" +A1091 = "" A1092 = "" A1093 = "" A1094 = "" A1095 = "" A1096 = "" A1097 = "" A1098 = "" A1099 = "" A1100 = "" +A1101 = "" A1102 = "" A1103 = "" A1104 = "" A1105 = "" A1106 = "" A1107 = "" A1108 = "" A1109 = "" A1110 = "" +A1111 = "" A1112 = "" A1113 = "" A1114 = "" A1115 = "" A1116 = "" A1117 = "" A1118 = "" A1119 = "" A1120 = "" +A1121 = "" A1122 = "" A1123 = "" A1124 = "" A1125 = "" A1126 = "" A1127 = "" A1128 = "" A1129 = "" A1130 = "" +A1131 = "" A1132 = "" A1133 = "" A1134 = "" A1135 = "" A1136 = "" A1137 = "" A1138 = "" A1139 = "" A1140 = "" +A1141 = "" A1142 = "" A1143 = "" A1144 = "" A1145 = "" A1146 = "" A1147 = "" A1148 = "" A1149 = "" A1150 = "" +A1151 = "" A1152 = "" A1153 = "" A1154 = "" A1155 = "" A1156 = "" A1157 = "" A1158 = "" A1159 = "" A1160 = "" +A1161 = "" A1162 = "" A1163 = "" A1164 = "" A1165 = "" A1166 = "" A1167 = "" A1168 = "" A1169 = "" A1170 = "" +A1171 = "" A1172 = "" A1173 = "" A1174 = "" A1175 = "" A1176 = "" A1177 = "" A1178 = "" A1179 = "" A1180 = "" +A1181 = "" A1182 = "" A1183 = "" A1184 = "" A1185 = "" A1186 = "" A1187 = "" A1188 = "" A1189 = "" A1190 = "" +A1191 = "" A1192 = "" A1193 = "" A1194 = "" A1195 = "" A1196 = "" A1197 = "" A1198 = "" A1199 = "" A1200 = "" +A1201 = "" A1202 = "" A1203 = "" A1204 = "" A1205 = "" A1206 = "" A1207 = "" A1208 = "" A1209 = "" A1210 = "" +A1211 = "" A1212 = "" A1213 = "" A1214 = "" A1215 = "" A1216 = "" A1217 = "" A1218 = "" A1219 = "" A1220 = "" +A1221 = "" A1222 = "" A1223 = "" A1224 = "" A1225 = "" A1226 = "" A1227 = "" A1228 = "" A1229 = "" A1230 = "" +A1231 = "" A1232 = "" A1233 = "" A1234 = "" A1235 = "" A1236 = "" A1237 = "" A1238 = "" A1239 = "" A1240 = "" +A1241 = "" A1242 = "" A1243 = "" A1244 = "" A1245 = "" A1246 = "" A1247 = "" A1248 = "" A1249 = "" A1250 = "" +A1251 = "" A1252 = "" A1253 = "" A1254 = "" A1255 = "" A1256 = "" A1257 = "" A1258 = "" A1259 = "" A1260 = "" +A1261 = "" A1262 = "" A1263 = "" A1264 = "" A1265 = "" A1266 = "" A1267 = "" A1268 = "" A1269 = "" A1270 = "" +A1271 = "" A1272 = "" A1273 = "" A1274 = "" A1275 = "" A1276 = "" A1277 = "" A1278 = "" A1279 = "" A1280 = "" +A1281 = "" A1282 = "" A1283 = "" A1284 = "" A1285 = "" A1286 = "" A1287 = "" A1288 = "" A1289 = "" A1290 = "" +A1291 = "" A1292 = "" A1293 = "" A1294 = "" A1295 = "" A1296 = "" A1297 = "" A1298 = "" A1299 = "" A1300 = "" +A1301 = "" A1302 = "" A1303 = "" A1304 = "" A1305 = "" A1306 = "" A1307 = "" A1308 = "" A1309 = "" A1310 = "" +A1311 = "" A1312 = "" A1313 = "" A1314 = "" A1315 = "" A1316 = "" A1317 = "" A1318 = "" A1319 = "" A1320 = "" +A1321 = "" A1322 = "" A1323 = "" A1324 = "" A1325 = "" A1326 = "" A1327 = "" A1328 = "" A1329 = "" A1330 = "" +A1331 = "" A1332 = "" A1333 = "" A1334 = "" A1335 = "" A1336 = "" A1337 = "" A1338 = "" A1339 = "" A1340 = "" +A1341 = "" A1342 = "" A1343 = "" A1344 = "" A1345 = "" A1346 = "" A1347 = "" A1348 = "" A1349 = "" A1350 = "" +A1351 = "" A1352 = "" A1353 = "" A1354 = "" A1355 = "" A1356 = "" A1357 = "" A1358 = "" A1359 = "" A1360 = "" +A1361 = "" A1362 = "" A1363 = "" A1364 = "" A1365 = "" A1366 = "" A1367 = "" A1368 = "" A1369 = "" A1370 = "" +A1371 = "" A1372 = "" A1373 = "" A1374 = "" A1375 = "" A1376 = "" A1377 = "" A1378 = "" A1379 = "" A1380 = "" +A1381 = "" A1382 = "" A1383 = "" A1384 = "" A1385 = "" A1386 = "" A1387 = "" A1388 = "" A1389 = "" A1390 = "" +A1391 = "" A1392 = "" A1393 = "" A1394 = "" A1395 = "" A1396 = "" A1397 = "" A1398 = "" A1399 = "" A1400 = "" +A1401 = "" A1402 = "" A1403 = "" A1404 = "" A1405 = "" A1406 = "" A1407 = "" A1408 = "" A1409 = "" A1410 = "" +A1411 = "" A1412 = "" A1413 = "" A1414 = "" A1415 = "" A1416 = "" A1417 = "" A1418 = "" A1419 = "" A1420 = "" +A1421 = "" A1422 = "" A1423 = "" A1424 = "" A1425 = "" A1426 = "" A1427 = "" A1428 = "" A1429 = "" A1430 = "" +A1431 = "" A1432 = "" A1433 = "" A1434 = "" A1435 = "" A1436 = "" A1437 = "" A1438 = "" A1439 = "" A1440 = "" +A1441 = "" A1442 = "" A1443 = "" A1444 = "" A1445 = "" A1446 = "" A1447 = "" A1448 = "" A1449 = "" A1450 = "" +A1451 = "" A1452 = "" A1453 = "" A1454 = "" A1455 = "" A1456 = "" A1457 = "" A1458 = "" A1459 = "" A1460 = "" +A1461 = "" A1462 = "" A1463 = "" A1464 = "" A1465 = "" A1466 = "" A1467 = "" A1468 = "" A1469 = "" A1470 = "" +A1471 = "" A1472 = "" A1473 = "" A1474 = "" A1475 = "" A1476 = "" A1477 = "" A1478 = "" A1479 = "" A1480 = "" +A1481 = "" A1482 = "" A1483 = "" A1484 = "" A1485 = "" A1486 = "" A1487 = "" A1488 = "" A1489 = "" A1490 = "" +A1491 = "" A1492 = "" A1493 = "" A1494 = "" A1495 = "" A1496 = "" A1497 = "" A1498 = "" A1499 = "" A1500 = "" +A1501 = "" A1502 = "" A1503 = "" A1504 = "" A1505 = "" A1506 = "" A1507 = "" A1508 = "" A1509 = "" A1510 = "" +A1511 = "" A1512 = "" A1513 = "" A1514 = "" A1515 = "" A1516 = "" A1517 = "" A1518 = "" A1519 = "" A1520 = "" +A1521 = "" A1522 = "" A1523 = "" A1524 = "" A1525 = "" A1526 = "" A1527 = "" A1528 = "" A1529 = "" A1530 = "" +A1531 = "" A1532 = "" A1533 = "" A1534 = "" A1535 = "" A1536 = "" A1537 = "" A1538 = "" A1539 = "" A1540 = "" +A1541 = "" A1542 = "" A1543 = "" A1544 = "" A1545 = "" A1546 = "" A1547 = "" A1548 = "" A1549 = "" A1550 = "" +A1551 = "" A1552 = "" A1553 = "" A1554 = "" A1555 = "" A1556 = "" A1557 = "" A1558 = "" A1559 = "" A1560 = "" +A1561 = "" A1562 = "" A1563 = "" A1564 = "" A1565 = "" A1566 = "" A1567 = "" A1568 = "" A1569 = "" A1570 = "" +A1571 = "" A1572 = "" A1573 = "" A1574 = "" A1575 = "" A1576 = "" A1577 = "" A1578 = "" A1579 = "" A1580 = "" +A1581 = "" A1582 = "" A1583 = "" A1584 = "" A1585 = "" A1586 = "" A1587 = "" A1588 = "" A1589 = "" A1590 = "" +A1591 = "" A1592 = "" A1593 = "" A1594 = "" A1595 = "" A1596 = "" A1597 = "" A1598 = "" A1599 = "" A1600 = "" +A1601 = "" A1602 = "" A1603 = "" A1604 = "" A1605 = "" A1606 = "" A1607 = "" A1608 = "" A1609 = "" A1610 = "" +A1611 = "" A1612 = "" A1613 = "" A1614 = "" A1615 = "" A1616 = "" A1617 = "" A1618 = "" A1619 = "" A1620 = "" +A1621 = "" A1622 = "" A1623 = "" A1624 = "" A1625 = "" A1626 = "" A1627 = "" A1628 = "" A1629 = "" A1630 = "" +A1631 = "" A1632 = "" A1633 = "" A1634 = "" A1635 = "" A1636 = "" A1637 = "" A1638 = "" A1639 = "" A1640 = "" +A1641 = "" A1642 = "" A1643 = "" A1644 = "" A1645 = "" A1646 = "" A1647 = "" A1648 = "" A1649 = "" A1650 = "" +A1651 = "" A1652 = "" A1653 = "" A1654 = "" A1655 = "" A1656 = "" A1657 = "" A1658 = "" A1659 = "" A1660 = "" +A1661 = "" A1662 = "" A1663 = "" A1664 = "" A1665 = "" A1666 = "" A1667 = "" A1668 = "" A1669 = "" A1670 = "" +A1671 = "" A1672 = "" A1673 = "" A1674 = "" A1675 = "" A1676 = "" A1677 = "" A1678 = "" A1679 = "" A1680 = "" +A1681 = "" A1682 = "" A1683 = "" A1684 = "" A1685 = "" A1686 = "" A1687 = "" A1688 = "" A1689 = "" A1690 = "" +A1691 = "" A1692 = "" A1693 = "" A1694 = "" A1695 = "" A1696 = "" A1697 = "" A1698 = "" A1699 = "" A1700 = "" +A1701 = "" A1702 = "" A1703 = "" A1704 = "" A1705 = "" A1706 = "" A1707 = "" A1708 = "" A1709 = "" A1710 = "" +A1711 = "" A1712 = "" A1713 = "" A1714 = "" A1715 = "" A1716 = "" A1717 = "" A1718 = "" A1719 = "" A1720 = "" +A1721 = "" A1722 = "" A1723 = "" A1724 = "" A1725 = "" A1726 = "" A1727 = "" A1728 = "" A1729 = "" A1730 = "" +A1731 = "" A1732 = "" A1733 = "" A1734 = "" A1735 = "" A1736 = "" A1737 = "" A1738 = "" A1739 = "" A1740 = "" +A1741 = "" A1742 = "" A1743 = "" A1744 = "" A1745 = "" A1746 = "" A1747 = "" A1748 = "" A1749 = "" A1750 = "" +A1751 = "" A1752 = "" A1753 = "" A1754 = "" A1755 = "" A1756 = "" A1757 = "" A1758 = "" A1759 = "" A1760 = "" +A1761 = "" A1762 = "" A1763 = "" A1764 = "" A1765 = "" A1766 = "" A1767 = "" A1768 = "" A1769 = "" A1770 = "" +A1771 = "" A1772 = "" A1773 = "" A1774 = "" A1775 = "" A1776 = "" A1777 = "" A1778 = "" A1779 = "" A1780 = "" +A1781 = "" A1782 = "" A1783 = "" A1784 = "" A1785 = "" A1786 = "" A1787 = "" A1788 = "" A1789 = "" A1790 = "" +A1791 = "" A1792 = "" A1793 = "" A1794 = "" A1795 = "" A1796 = "" A1797 = "" A1798 = "" A1799 = "" A1800 = "" +A1801 = "" A1802 = "" A1803 = "" A1804 = "" A1805 = "" A1806 = "" A1807 = "" A1808 = "" A1809 = "" A1810 = "" +A1811 = "" A1812 = "" A1813 = "" A1814 = "" A1815 = "" A1816 = "" A1817 = "" A1818 = "" A1819 = "" A1820 = "" +A1821 = "" A1822 = "" A1823 = "" A1824 = "" A1825 = "" A1826 = "" A1827 = "" A1828 = "" A1829 = "" A1830 = "" +A1831 = "" A1832 = "" A1833 = "" A1834 = "" A1835 = "" A1836 = "" A1837 = "" A1838 = "" A1839 = "" A1840 = "" +A1841 = "" A1842 = "" A1843 = "" A1844 = "" A1845 = "" A1846 = "" A1847 = "" A1848 = "" A1849 = "" A1850 = "" +A1851 = "" A1852 = "" A1853 = "" A1854 = "" A1855 = "" A1856 = "" A1857 = "" A1858 = "" A1859 = "" A1860 = "" +A1861 = "" A1862 = "" A1863 = "" A1864 = "" A1865 = "" A1866 = "" A1867 = "" A1868 = "" A1869 = "" A1870 = "" +A1871 = "" A1872 = "" A1873 = "" A1874 = "" A1875 = "" A1876 = "" A1877 = "" A1878 = "" A1879 = "" A1880 = "" +A1881 = "" A1882 = "" A1883 = "" A1884 = "" A1885 = "" A1886 = "" A1887 = "" A1888 = "" A1889 = "" A1890 = "" +A1891 = "" A1892 = "" A1893 = "" A1894 = "" A1895 = "" A1896 = "" A1897 = "" A1898 = "" A1899 = "" A1900 = "" +A1901 = "" A1902 = "" A1903 = "" A1904 = "" A1905 = "" A1906 = "" A1907 = "" A1908 = "" A1909 = "" A1910 = "" +A1911 = "" A1912 = "" A1913 = "" A1914 = "" A1915 = "" A1916 = "" A1917 = "" A1918 = "" A1919 = "" A1920 = "" +A1921 = "" A1922 = "" A1923 = "" A1924 = "" A1925 = "" A1926 = "" A1927 = "" A1928 = "" A1929 = "" A1930 = "" +A1931 = "" A1932 = "" A1933 = "" A1934 = "" A1935 = "" A1936 = "" A1937 = "" A1938 = "" A1939 = "" A1940 = "" +A1941 = "" A1942 = "" A1943 = "" A1944 = "" A1945 = "" A1946 = "" A1947 = "" A1948 = "" A1949 = "" A1950 = "" +A1951 = "" A1952 = "" A1953 = "" A1954 = "" A1955 = "" A1956 = "" A1957 = "" A1958 = "" A1959 = "" A1960 = "" +A1961 = "" A1962 = "" A1963 = "" A1964 = "" A1965 = "" A1966 = "" A1967 = "" A1968 = "" A1969 = "" A1970 = "" +A1971 = "" A1972 = "" A1973 = "" A1974 = "" A1975 = "" A1976 = "" A1977 = "" A1978 = "" A1979 = "" A1980 = "" +A1981 = "" A1982 = "" A1983 = "" A1984 = "" A1985 = "" A1986 = "" A1987 = "" A1988 = "" A1989 = "" A1990 = "" +A1991 = "" A1992 = "" A1993 = "" A1994 = "" A1995 = "" A1996 = "" A1997 = "" A1998 = "" A1999 = "" A2000 = "" +A2001 = "" A2002 = "" A2003 = "" A2004 = "" A2005 = "" A2006 = "" A2007 = "" A2008 = "" A2009 = "" A2010 = "" +A2011 = "" A2012 = "" A2013 = "" A2014 = "" A2015 = "" A2016 = "" A2017 = "" A2018 = "" A2019 = "" A2020 = "" +A2021 = "" A2022 = "" A2023 = "" A2024 = "" A2025 = "" A2026 = "" A2027 = "" A2028 = "" A2029 = "" A2030 = "" +A2031 = "" A2032 = "" A2033 = "" A2034 = "" A2035 = "" A2036 = "" A2037 = "" A2038 = "" A2039 = "" A2040 = "" +A2041 = "" A2042 = "" A2043 = "" A2044 = "" A2045 = "" A2046 = "" A2047 = "" A2048 = "" A2049 = "" A2050 = "" +A2051 = "" A2052 = "" A2053 = "" A2054 = "" A2055 = "" A2056 = "" A2057 = "" A2058 = "" A2059 = "" A2060 = "" +A2061 = "" A2062 = "" A2063 = "" A2064 = "" A2065 = "" A2066 = "" A2067 = "" A2068 = "" A2069 = "" A2070 = "" +A2071 = "" A2072 = "" A2073 = "" A2074 = "" A2075 = "" A2076 = "" A2077 = "" A2078 = "" A2079 = "" A2080 = "" +A2081 = "" A2082 = "" A2083 = "" A2084 = "" A2085 = "" A2086 = "" A2087 = "" A2088 = "" A2089 = "" A2090 = "" +A2091 = "" A2092 = "" A2093 = "" A2094 = "" A2095 = "" A2096 = "" A2097 = "" A2098 = "" A2099 = "" A2100 = "" +A2101 = "" A2102 = "" A2103 = "" A2104 = "" A2105 = "" A2106 = "" A2107 = "" A2108 = "" A2109 = "" A2110 = "" +A2111 = "" A2112 = "" A2113 = "" A2114 = "" A2115 = "" A2116 = "" A2117 = "" A2118 = "" A2119 = "" A2120 = "" +A2121 = "" A2122 = "" A2123 = "" A2124 = "" A2125 = "" A2126 = "" A2127 = "" A2128 = "" A2129 = "" A2130 = "" +A2131 = "" A2132 = "" A2133 = "" A2134 = "" A2135 = "" A2136 = "" A2137 = "" A2138 = "" A2139 = "" A2140 = "" +A2141 = "" A2142 = "" A2143 = "" A2144 = "" A2145 = "" A2146 = "" A2147 = "" A2148 = "" A2149 = "" A2150 = "" +A2151 = "" A2152 = "" A2153 = "" A2154 = "" A2155 = "" A2156 = "" A2157 = "" A2158 = "" A2159 = "" A2160 = "" +A2161 = "" A2162 = "" A2163 = "" A2164 = "" A2165 = "" A2166 = "" A2167 = "" A2168 = "" A2169 = "" A2170 = "" +A2171 = "" A2172 = "" A2173 = "" A2174 = "" A2175 = "" A2176 = "" A2177 = "" A2178 = "" A2179 = "" A2180 = "" +A2181 = "" A2182 = "" A2183 = "" A2184 = "" A2185 = "" A2186 = "" A2187 = "" A2188 = "" A2189 = "" A2190 = "" +A2191 = "" A2192 = "" A2193 = "" A2194 = "" A2195 = "" A2196 = "" A2197 = "" A2198 = "" A2199 = "" A2200 = "" +A2201 = "" A2202 = "" A2203 = "" A2204 = "" A2205 = "" A2206 = "" A2207 = "" A2208 = "" A2209 = "" A2210 = "" +A2211 = "" A2212 = "" A2213 = "" A2214 = "" A2215 = "" A2216 = "" A2217 = "" A2218 = "" A2219 = "" A2220 = "" +A2221 = "" A2222 = "" A2223 = "" A2224 = "" A2225 = "" A2226 = "" A2227 = "" A2228 = "" A2229 = "" A2230 = "" +A2231 = "" A2232 = "" A2233 = "" A2234 = "" A2235 = "" A2236 = "" A2237 = "" A2238 = "" A2239 = "" A2240 = "" +A2241 = "" A2242 = "" A2243 = "" A2244 = "" A2245 = "" A2246 = "" A2247 = "" A2248 = "" A2249 = "" A2250 = "" +A2251 = "" A2252 = "" A2253 = "" A2254 = "" A2255 = "" A2256 = "" A2257 = "" A2258 = "" A2259 = "" A2260 = "" +A2261 = "" A2262 = "" A2263 = "" A2264 = "" A2265 = "" A2266 = "" A2267 = "" A2268 = "" A2269 = "" A2270 = "" +A2271 = "" A2272 = "" A2273 = "" A2274 = "" A2275 = "" A2276 = "" A2277 = "" A2278 = "" A2279 = "" A2280 = "" +A2281 = "" A2282 = "" A2283 = "" A2284 = "" A2285 = "" A2286 = "" A2287 = "" A2288 = "" A2289 = "" A2290 = "" +A2291 = "" A2292 = "" A2293 = "" A2294 = "" A2295 = "" A2296 = "" A2297 = "" A2298 = "" A2299 = "" A2300 = "" +A2301 = "" A2302 = "" A2303 = "" A2304 = "" A2305 = "" A2306 = "" A2307 = "" A2308 = "" A2309 = "" A2310 = "" +A2311 = "" A2312 = "" A2313 = "" A2314 = "" A2315 = "" A2316 = "" A2317 = "" A2318 = "" A2319 = "" A2320 = "" +A2321 = "" A2322 = "" A2323 = "" A2324 = "" A2325 = "" A2326 = "" A2327 = "" A2328 = "" A2329 = "" A2330 = "" +A2331 = "" A2332 = "" A2333 = "" A2334 = "" A2335 = "" A2336 = "" A2337 = "" A2338 = "" A2339 = "" A2340 = "" +A2341 = "" A2342 = "" A2343 = "" A2344 = "" A2345 = "" A2346 = "" A2347 = "" A2348 = "" A2349 = "" A2350 = "" +A2351 = "" A2352 = "" A2353 = "" A2354 = "" A2355 = "" A2356 = "" A2357 = "" A2358 = "" A2359 = "" A2360 = "" +A2361 = "" A2362 = "" A2363 = "" A2364 = "" A2365 = "" A2366 = "" A2367 = "" A2368 = "" A2369 = "" A2370 = "" +A2371 = "" A2372 = "" A2373 = "" A2374 = "" A2375 = "" A2376 = "" A2377 = "" A2378 = "" A2379 = "" A2380 = "" +A2381 = "" A2382 = "" A2383 = "" A2384 = "" A2385 = "" A2386 = "" A2387 = "" A2388 = "" A2389 = "" A2390 = "" +A2391 = "" A2392 = "" A2393 = "" A2394 = "" A2395 = "" A2396 = "" A2397 = "" A2398 = "" A2399 = "" A2400 = "" +A2401 = "" A2402 = "" A2403 = "" A2404 = "" A2405 = "" A2406 = "" A2407 = "" A2408 = "" A2409 = "" A2410 = "" +A2411 = "" A2412 = "" A2413 = "" A2414 = "" A2415 = "" A2416 = "" A2417 = "" A2418 = "" A2419 = "" A2420 = "" +A2421 = "" A2422 = "" A2423 = "" A2424 = "" A2425 = "" A2426 = "" A2427 = "" A2428 = "" A2429 = "" A2430 = "" +A2431 = "" A2432 = "" A2433 = "" A2434 = "" A2435 = "" A2436 = "" A2437 = "" A2438 = "" A2439 = "" A2440 = "" +A2441 = "" A2442 = "" A2443 = "" A2444 = "" A2445 = "" A2446 = "" A2447 = "" A2448 = "" A2449 = "" A2450 = "" +A2451 = "" A2452 = "" A2453 = "" A2454 = "" A2455 = "" A2456 = "" A2457 = "" A2458 = "" A2459 = "" A2460 = "" +A2461 = "" A2462 = "" A2463 = "" A2464 = "" A2465 = "" A2466 = "" A2467 = "" A2468 = "" A2469 = "" A2470 = "" +A2471 = "" A2472 = "" A2473 = "" A2474 = "" A2475 = "" A2476 = "" A2477 = "" A2478 = "" A2479 = "" A2480 = "" +A2481 = "" A2482 = "" A2483 = "" A2484 = "" A2485 = "" A2486 = "" A2487 = "" A2488 = "" A2489 = "" A2490 = "" +A2491 = "" A2492 = "" A2493 = "" A2494 = "" A2495 = "" A2496 = "" A2497 = "" A2498 = "" A2499 = "" A2500 = "" +A2501 = "" A2502 = "" A2503 = "" A2504 = "" A2505 = "" A2506 = "" A2507 = "" A2508 = "" A2509 = "" A2510 = "" +A2511 = "" A2512 = "" A2513 = "" A2514 = "" A2515 = "" A2516 = "" A2517 = "" A2518 = "" A2519 = "" A2520 = "" +A2521 = "" A2522 = "" A2523 = "" A2524 = "" A2525 = "" A2526 = "" A2527 = "" A2528 = "" A2529 = "" A2530 = "" +A2531 = "" A2532 = "" A2533 = "" A2534 = "" A2535 = "" A2536 = "" A2537 = "" A2538 = "" A2539 = "" A2540 = "" +A2541 = "" A2542 = "" A2543 = "" A2544 = "" A2545 = "" A2546 = "" A2547 = "" A2548 = "" A2549 = "" A2550 = "" +A2551 = "" A2552 = "" A2553 = "" A2554 = "" A2555 = "" A2556 = "" A2557 = "" A2558 = "" A2559 = "" A2560 = "" +A2561 = "" A2562 = "" A2563 = "" A2564 = "" A2565 = "" A2566 = "" A2567 = "" A2568 = "" A2569 = "" A2570 = "" +A2571 = "" A2572 = "" A2573 = "" A2574 = "" A2575 = "" A2576 = "" A2577 = "" A2578 = "" A2579 = "" A2580 = "" +A2581 = "" A2582 = "" A2583 = "" A2584 = "" A2585 = "" A2586 = "" A2587 = "" A2588 = "" A2589 = "" A2590 = "" +A2591 = "" A2592 = "" A2593 = "" A2594 = "" A2595 = "" A2596 = "" A2597 = "" A2598 = "" A2599 = "" A2600 = "" +A2601 = "" A2602 = "" A2603 = "" A2604 = "" A2605 = "" A2606 = "" A2607 = "" A2608 = "" A2609 = "" A2610 = "" +A2611 = "" A2612 = "" A2613 = "" A2614 = "" A2615 = "" A2616 = "" A2617 = "" A2618 = "" A2619 = "" A2620 = "" +A2621 = "" A2622 = "" A2623 = "" A2624 = "" A2625 = "" A2626 = "" A2627 = "" A2628 = "" A2629 = "" A2630 = "" +A2631 = "" A2632 = "" A2633 = "" A2634 = "" A2635 = "" A2636 = "" A2637 = "" A2638 = "" A2639 = "" A2640 = "" +A2641 = "" A2642 = "" A2643 = "" A2644 = "" A2645 = "" A2646 = "" A2647 = "" A2648 = "" A2649 = "" A2650 = "" +A2651 = "" A2652 = "" A2653 = "" A2654 = "" A2655 = "" A2656 = "" A2657 = "" A2658 = "" A2659 = "" A2660 = "" +A2661 = "" A2662 = "" A2663 = "" A2664 = "" A2665 = "" A2666 = "" A2667 = "" A2668 = "" A2669 = "" A2670 = "" +A2671 = "" A2672 = "" A2673 = "" A2674 = "" A2675 = "" A2676 = "" A2677 = "" A2678 = "" A2679 = "" A2680 = "" +A2681 = "" A2682 = "" A2683 = "" A2684 = "" A2685 = "" A2686 = "" A2687 = "" A2688 = "" A2689 = "" A2690 = "" +A2691 = "" A2692 = "" A2693 = "" A2694 = "" A2695 = "" A2696 = "" A2697 = "" A2698 = "" A2699 = "" A2700 = "" +A2701 = "" A2702 = "" A2703 = "" A2704 = "" A2705 = "" A2706 = "" A2707 = "" A2708 = "" A2709 = "" A2710 = "" +A2711 = "" A2712 = "" A2713 = "" A2714 = "" A2715 = "" A2716 = "" A2717 = "" A2718 = "" A2719 = "" A2720 = "" +A2721 = "" A2722 = "" A2723 = "" A2724 = "" A2725 = "" A2726 = "" A2727 = "" A2728 = "" A2729 = "" A2730 = "" +A2731 = "" A2732 = "" A2733 = "" A2734 = "" A2735 = "" A2736 = "" A2737 = "" A2738 = "" A2739 = "" A2740 = "" +A2741 = "" A2742 = "" A2743 = "" A2744 = "" A2745 = "" A2746 = "" A2747 = "" A2748 = "" A2749 = "" A2750 = "" +A2751 = "" A2752 = "" A2753 = "" A2754 = "" A2755 = "" A2756 = "" A2757 = "" A2758 = "" A2759 = "" A2760 = "" +A2761 = "" A2762 = "" A2763 = "" A2764 = "" A2765 = "" A2766 = "" A2767 = "" A2768 = "" A2769 = "" A2770 = "" +A2771 = "" A2772 = "" A2773 = "" A2774 = "" A2775 = "" A2776 = "" A2777 = "" A2778 = "" A2779 = "" A2780 = "" +A2781 = "" A2782 = "" A2783 = "" A2784 = "" A2785 = "" A2786 = "" A2787 = "" A2788 = "" A2789 = "" A2790 = "" +A2791 = "" A2792 = "" A2793 = "" A2794 = "" A2795 = "" A2796 = "" A2797 = "" A2798 = "" A2799 = "" A2800 = "" +A2801 = "" A2802 = "" A2803 = "" A2804 = "" A2805 = "" A2806 = "" A2807 = "" A2808 = "" A2809 = "" A2810 = "" +A2811 = "" A2812 = "" A2813 = "" A2814 = "" A2815 = "" A2816 = "" A2817 = "" A2818 = "" A2819 = "" A2820 = "" +A2821 = "" A2822 = "" A2823 = "" A2824 = "" A2825 = "" A2826 = "" A2827 = "" A2828 = "" A2829 = "" A2830 = "" +A2831 = "" A2832 = "" A2833 = "" A2834 = "" A2835 = "" A2836 = "" A2837 = "" A2838 = "" A2839 = "" A2840 = "" +A2841 = "" A2842 = "" A2843 = "" A2844 = "" A2845 = "" A2846 = "" A2847 = "" A2848 = "" A2849 = "" A2850 = "" +A2851 = "" A2852 = "" A2853 = "" A2854 = "" A2855 = "" A2856 = "" A2857 = "" A2858 = "" A2859 = "" A2860 = "" +A2861 = "" A2862 = "" A2863 = "" A2864 = "" A2865 = "" A2866 = "" A2867 = "" A2868 = "" A2869 = "" A2870 = "" +A2871 = "" A2872 = "" A2873 = "" A2874 = "" A2875 = "" A2876 = "" A2877 = "" A2878 = "" A2879 = "" A2880 = "" +A2881 = "" A2882 = "" A2883 = "" A2884 = "" A2885 = "" A2886 = "" A2887 = "" A2888 = "" A2889 = "" A2890 = "" +A2891 = "" A2892 = "" A2893 = "" A2894 = "" A2895 = "" A2896 = "" A2897 = "" A2898 = "" A2899 = "" A2900 = "" +A2901 = "" A2902 = "" A2903 = "" A2904 = "" A2905 = "" A2906 = "" A2907 = "" A2908 = "" A2909 = "" A2910 = "" +A2911 = "" A2912 = "" A2913 = "" A2914 = "" A2915 = "" A2916 = "" A2917 = "" A2918 = "" A2919 = "" A2920 = "" +A2921 = "" A2922 = "" A2923 = "" A2924 = "" A2925 = "" A2926 = "" A2927 = "" A2928 = "" A2929 = "" A2930 = "" +A2931 = "" A2932 = "" A2933 = "" A2934 = "" A2935 = "" A2936 = "" A2937 = "" A2938 = "" A2939 = "" A2940 = "" +A2941 = "" A2942 = "" A2943 = "" A2944 = "" A2945 = "" A2946 = "" A2947 = "" A2948 = "" A2949 = "" A2950 = "" +A2951 = "" A2952 = "" A2953 = "" A2954 = "" A2955 = "" A2956 = "" A2957 = "" A2958 = "" A2959 = "" A2960 = "" +A2961 = "" A2962 = "" A2963 = "" A2964 = "" A2965 = "" A2966 = "" A2967 = "" A2968 = "" A2969 = "" A2970 = "" +A2971 = "" A2972 = "" A2973 = "" A2974 = "" A2975 = "" A2976 = "" A2977 = "" A2978 = "" A2979 = "" A2980 = "" +A2981 = "" A2982 = "" A2983 = "" A2984 = "" A2985 = "" A2986 = "" A2987 = "" A2988 = "" A2989 = "" A2990 = "" +A2991 = "" A2992 = "" A2993 = "" A2994 = "" A2995 = "" A2996 = "" A2997 = "" A2998 = "" A2999 = "" A3000 = "" +A3001 = "" A3002 = "" A3003 = "" A3004 = "" A3005 = "" A3006 = "" A3007 = "" A3008 = "" A3009 = "" A3010 = "" +A3011 = "" A3012 = "" A3013 = "" A3014 = "" A3015 = "" A3016 = "" A3017 = "" A3018 = "" A3019 = "" A3020 = "" +A3021 = "" A3022 = "" A3023 = "" A3024 = "" A3025 = "" A3026 = "" A3027 = "" A3028 = "" A3029 = "" A3030 = "" +A3031 = "" A3032 = "" A3033 = "" A3034 = "" A3035 = "" A3036 = "" A3037 = "" A3038 = "" A3039 = "" A3040 = "" +A3041 = "" A3042 = "" A3043 = "" A3044 = "" A3045 = "" A3046 = "" A3047 = "" A3048 = "" A3049 = "" A3050 = "" +A3051 = "" A3052 = "" A3053 = "" A3054 = "" A3055 = "" A3056 = "" A3057 = "" A3058 = "" A3059 = "" A3060 = "" +A3061 = "" A3062 = "" A3063 = "" A3064 = "" A3065 = "" A3066 = "" A3067 = "" A3068 = "" A3069 = "" A3070 = "" +A3071 = "" A3072 = "" A3073 = "" A3074 = "" A3075 = "" A3076 = "" A3077 = "" A3078 = "" A3079 = "" A3080 = "" +A3081 = "" A3082 = "" A3083 = "" A3084 = "" A3085 = "" A3086 = "" A3087 = "" A3088 = "" A3089 = "" A3090 = "" +A3091 = "" A3092 = "" A3093 = "" A3094 = "" A3095 = "" A3096 = "" A3097 = "" A3098 = "" A3099 = "" A3100 = "" +A3101 = "" A3102 = "" A3103 = "" A3104 = "" A3105 = "" A3106 = "" A3107 = "" A3108 = "" A3109 = "" A3110 = "" +A3111 = "" A3112 = "" A3113 = "" A3114 = "" A3115 = "" A3116 = "" A3117 = "" A3118 = "" A3119 = "" A3120 = "" +A3121 = "" A3122 = "" A3123 = "" A3124 = "" A3125 = "" A3126 = "" A3127 = "" A3128 = "" A3129 = "" A3130 = "" +A3131 = "" A3132 = "" A3133 = "" A3134 = "" A3135 = "" A3136 = "" A3137 = "" A3138 = "" A3139 = "" A3140 = "" +A3141 = "" A3142 = "" A3143 = "" A3144 = "" A3145 = "" A3146 = "" A3147 = "" A3148 = "" A3149 = "" A3150 = "" +A3151 = "" A3152 = "" A3153 = "" A3154 = "" A3155 = "" A3156 = "" A3157 = "" A3158 = "" A3159 = "" A3160 = "" +A3161 = "" A3162 = "" A3163 = "" A3164 = "" A3165 = "" A3166 = "" A3167 = "" A3168 = "" A3169 = "" A3170 = "" +A3171 = "" A3172 = "" A3173 = "" A3174 = "" A3175 = "" A3176 = "" A3177 = "" A3178 = "" A3179 = "" A3180 = "" +A3181 = "" A3182 = "" A3183 = "" A3184 = "" A3185 = "" A3186 = "" A3187 = "" A3188 = "" A3189 = "" A3190 = "" +A3191 = "" A3192 = "" A3193 = "" A3194 = "" A3195 = "" A3196 = "" A3197 = "" A3198 = "" A3199 = "" A3200 = "" +A3201 = "" A3202 = "" A3203 = "" A3204 = "" A3205 = "" A3206 = "" A3207 = "" A3208 = "" A3209 = "" A3210 = "" +A3211 = "" A3212 = "" A3213 = "" A3214 = "" A3215 = "" A3216 = "" A3217 = "" A3218 = "" A3219 = "" A3220 = "" +A3221 = "" A3222 = "" A3223 = "" A3224 = "" A3225 = "" A3226 = "" A3227 = "" A3228 = "" A3229 = "" A3230 = "" +A3231 = "" A3232 = "" A3233 = "" A3234 = "" A3235 = "" A3236 = "" A3237 = "" A3238 = "" A3239 = "" A3240 = "" +A3241 = "" A3242 = "" A3243 = "" A3244 = "" A3245 = "" A3246 = "" A3247 = "" A3248 = "" A3249 = "" A3250 = "" +A3251 = "" A3252 = "" A3253 = "" A3254 = "" A3255 = "" A3256 = "" A3257 = "" A3258 = "" A3259 = "" A3260 = "" +A3261 = "" A3262 = "" A3263 = "" A3264 = "" A3265 = "" A3266 = "" A3267 = "" A3268 = "" A3269 = "" A3270 = "" +A3271 = "" A3272 = "" A3273 = "" A3274 = "" A3275 = "" A3276 = "" A3277 = "" A3278 = "" A3279 = "" A3280 = "" +A3281 = "" A3282 = "" A3283 = "" A3284 = "" A3285 = "" A3286 = "" A3287 = "" A3288 = "" A3289 = "" A3290 = "" +A3291 = "" A3292 = "" A3293 = "" A3294 = "" A3295 = "" A3296 = "" A3297 = "" A3298 = "" A3299 = "" A3300 = "" +A3301 = "" A3302 = "" A3303 = "" A3304 = "" A3305 = "" A3306 = "" A3307 = "" A3308 = "" A3309 = "" A3310 = "" +A3311 = "" A3312 = "" A3313 = "" A3314 = "" A3315 = "" A3316 = "" A3317 = "" A3318 = "" A3319 = "" A3320 = "" +A3321 = "" A3322 = "" A3323 = "" A3324 = "" A3325 = "" A3326 = "" A3327 = "" A3328 = "" A3329 = "" A3330 = "" +A3331 = "" A3332 = "" A3333 = "" A3334 = "" A3335 = "" A3336 = "" A3337 = "" A3338 = "" A3339 = "" A3340 = "" +A3341 = "" A3342 = "" A3343 = "" A3344 = "" A3345 = "" A3346 = "" A3347 = "" A3348 = "" A3349 = "" A3350 = "" +A3351 = "" A3352 = "" A3353 = "" A3354 = "" A3355 = "" A3356 = "" A3357 = "" A3358 = "" A3359 = "" A3360 = "" +A3361 = "" A3362 = "" A3363 = "" A3364 = "" A3365 = "" A3366 = "" A3367 = "" A3368 = "" A3369 = "" A3370 = "" +A3371 = "" A3372 = "" A3373 = "" A3374 = "" A3375 = "" A3376 = "" A3377 = "" A3378 = "" A3379 = "" A3380 = "" +A3381 = "" A3382 = "" A3383 = "" A3384 = "" A3385 = "" A3386 = "" A3387 = "" A3388 = "" A3389 = "" A3390 = "" +A3391 = "" A3392 = "" A3393 = "" A3394 = "" A3395 = "" A3396 = "" A3397 = "" A3398 = "" A3399 = "" A3400 = "" +A3401 = "" A3402 = "" A3403 = "" A3404 = "" A3405 = "" A3406 = "" A3407 = "" A3408 = "" A3409 = "" A3410 = "" +A3411 = "" A3412 = "" A3413 = "" A3414 = "" A3415 = "" A3416 = "" A3417 = "" A3418 = "" A3419 = "" A3420 = "" +A3421 = "" A3422 = "" A3423 = "" A3424 = "" A3425 = "" A3426 = "" A3427 = "" A3428 = "" A3429 = "" A3430 = "" +A3431 = "" A3432 = "" A3433 = "" A3434 = "" A3435 = "" A3436 = "" A3437 = "" A3438 = "" A3439 = "" A3440 = "" +A3441 = "" A3442 = "" A3443 = "" A3444 = "" A3445 = "" A3446 = "" A3447 = "" A3448 = "" A3449 = "" A3450 = "" +A3451 = "" A3452 = "" A3453 = "" A3454 = "" A3455 = "" A3456 = "" A3457 = "" A3458 = "" A3459 = "" A3460 = "" +A3461 = "" A3462 = "" A3463 = "" A3464 = "" A3465 = "" A3466 = "" A3467 = "" A3468 = "" A3469 = "" A3470 = "" +A3471 = "" A3472 = "" A3473 = "" A3474 = "" A3475 = "" A3476 = "" A3477 = "" A3478 = "" A3479 = "" A3480 = "" +A3481 = "" A3482 = "" A3483 = "" A3484 = "" A3485 = "" A3486 = "" A3487 = "" A3488 = "" A3489 = "" A3490 = "" +A3491 = "" A3492 = "" A3493 = "" A3494 = "" A3495 = "" A3496 = "" A3497 = "" A3498 = "" A3499 = "" A3500 = "" +A3501 = "" A3502 = "" A3503 = "" A3504 = "" A3505 = "" A3506 = "" A3507 = "" A3508 = "" A3509 = "" A3510 = "" +A3511 = "" A3512 = "" A3513 = "" A3514 = "" A3515 = "" A3516 = "" A3517 = "" A3518 = "" A3519 = "" A3520 = "" +A3521 = "" A3522 = "" A3523 = "" A3524 = "" A3525 = "" A3526 = "" A3527 = "" A3528 = "" A3529 = "" A3530 = "" +A3531 = "" A3532 = "" A3533 = "" A3534 = "" A3535 = "" A3536 = "" A3537 = "" A3538 = "" A3539 = "" A3540 = "" +A3541 = "" A3542 = "" A3543 = "" A3544 = "" A3545 = "" A3546 = "" A3547 = "" A3548 = "" A3549 = "" A3550 = "" +A3551 = "" A3552 = "" A3553 = "" A3554 = "" A3555 = "" A3556 = "" A3557 = "" A3558 = "" A3559 = "" A3560 = "" +A3561 = "" A3562 = "" A3563 = "" A3564 = "" A3565 = "" A3566 = "" A3567 = "" A3568 = "" A3569 = "" A3570 = "" +A3571 = "" A3572 = "" A3573 = "" A3574 = "" A3575 = "" A3576 = "" A3577 = "" A3578 = "" A3579 = "" A3580 = "" +A3581 = "" A3582 = "" A3583 = "" A3584 = "" A3585 = "" A3586 = "" A3587 = "" A3588 = "" A3589 = "" A3590 = "" +A3591 = "" A3592 = "" A3593 = "" A3594 = "" A3595 = "" A3596 = "" A3597 = "" A3598 = "" A3599 = "" A3600 = "" +A3601 = "" A3602 = "" A3603 = "" A3604 = "" A3605 = "" A3606 = "" A3607 = "" A3608 = "" A3609 = "" A3610 = "" +A3611 = "" A3612 = "" A3613 = "" A3614 = "" A3615 = "" A3616 = "" A3617 = "" A3618 = "" A3619 = "" A3620 = "" +A3621 = "" A3622 = "" A3623 = "" A3624 = "" A3625 = "" A3626 = "" A3627 = "" A3628 = "" A3629 = "" A3630 = "" +A3631 = "" A3632 = "" A3633 = "" A3634 = "" A3635 = "" A3636 = "" A3637 = "" A3638 = "" A3639 = "" A3640 = "" +A3641 = "" A3642 = "" A3643 = "" A3644 = "" A3645 = "" A3646 = "" A3647 = "" A3648 = "" A3649 = "" A3650 = "" +A3651 = "" A3652 = "" A3653 = "" A3654 = "" A3655 = "" A3656 = "" A3657 = "" A3658 = "" A3659 = "" A3660 = "" +A3661 = "" A3662 = "" A3663 = "" A3664 = "" A3665 = "" A3666 = "" A3667 = "" A3668 = "" A3669 = "" A3670 = "" +A3671 = "" A3672 = "" A3673 = "" A3674 = "" A3675 = "" A3676 = "" A3677 = "" A3678 = "" A3679 = "" A3680 = "" +A3681 = "" A3682 = "" A3683 = "" A3684 = "" A3685 = "" A3686 = "" A3687 = "" A3688 = "" A3689 = "" A3690 = "" +A3691 = "" A3692 = "" A3693 = "" A3694 = "" A3695 = "" A3696 = "" A3697 = "" A3698 = "" A3699 = "" A3700 = "" +A3701 = "" A3702 = "" A3703 = "" A3704 = "" A3705 = "" A3706 = "" A3707 = "" A3708 = "" A3709 = "" A3710 = "" +A3711 = "" A3712 = "" A3713 = "" A3714 = "" A3715 = "" A3716 = "" A3717 = "" A3718 = "" A3719 = "" A3720 = "" +A3721 = "" A3722 = "" A3723 = "" A3724 = "" A3725 = "" A3726 = "" A3727 = "" A3728 = "" A3729 = "" A3730 = "" +A3731 = "" A3732 = "" A3733 = "" A3734 = "" A3735 = "" A3736 = "" A3737 = "" A3738 = "" A3739 = "" A3740 = "" +A3741 = "" A3742 = "" A3743 = "" A3744 = "" A3745 = "" A3746 = "" A3747 = "" A3748 = "" A3749 = "" A3750 = "" +A3751 = "" A3752 = "" A3753 = "" A3754 = "" A3755 = "" A3756 = "" A3757 = "" A3758 = "" A3759 = "" A3760 = "" +A3761 = "" A3762 = "" A3763 = "" A3764 = "" A3765 = "" A3766 = "" A3767 = "" A3768 = "" A3769 = "" A3770 = "" +A3771 = "" A3772 = "" A3773 = "" A3774 = "" A3775 = "" A3776 = "" A3777 = "" A3778 = "" A3779 = "" A3780 = "" +A3781 = "" A3782 = "" A3783 = "" A3784 = "" A3785 = "" A3786 = "" A3787 = "" A3788 = "" A3789 = "" A3790 = "" +A3791 = "" A3792 = "" A3793 = "" A3794 = "" A3795 = "" A3796 = "" A3797 = "" A3798 = "" A3799 = "" A3800 = "" +A3801 = "" A3802 = "" A3803 = "" A3804 = "" A3805 = "" A3806 = "" A3807 = "" A3808 = "" A3809 = "" A3810 = "" +A3811 = "" A3812 = "" A3813 = "" A3814 = "" A3815 = "" A3816 = "" A3817 = "" A3818 = "" A3819 = "" A3820 = "" +A3821 = "" A3822 = "" A3823 = "" A3824 = "" A3825 = "" A3826 = "" A3827 = "" A3828 = "" A3829 = "" A3830 = "" +A3831 = "" A3832 = "" A3833 = "" A3834 = "" A3835 = "" A3836 = "" A3837 = "" A3838 = "" A3839 = "" A3840 = "" +A3841 = "" A3842 = "" A3843 = "" A3844 = "" A3845 = "" A3846 = "" A3847 = "" A3848 = "" A3849 = "" A3850 = "" +A3851 = "" A3852 = "" A3853 = "" A3854 = "" A3855 = "" A3856 = "" A3857 = "" A3858 = "" A3859 = "" A3860 = "" +A3861 = "" A3862 = "" A3863 = "" A3864 = "" A3865 = "" A3866 = "" A3867 = "" A3868 = "" A3869 = "" A3870 = "" +A3871 = "" A3872 = "" A3873 = "" A3874 = "" A3875 = "" A3876 = "" A3877 = "" A3878 = "" A3879 = "" A3880 = "" +A3881 = "" A3882 = "" A3883 = "" A3884 = "" A3885 = "" A3886 = "" A3887 = "" A3888 = "" A3889 = "" A3890 = "" +A3891 = "" A3892 = "" A3893 = "" A3894 = "" A3895 = "" A3896 = "" A3897 = "" A3898 = "" A3899 = "" A3900 = "" +A3901 = "" A3902 = "" A3903 = "" A3904 = "" A3905 = "" A3906 = "" A3907 = "" A3908 = "" A3909 = "" A3910 = "" +A3911 = "" A3912 = "" A3913 = "" A3914 = "" A3915 = "" A3916 = "" A3917 = "" A3918 = "" A3919 = "" A3920 = "" +A3921 = "" A3922 = "" A3923 = "" A3924 = "" A3925 = "" A3926 = "" A3927 = "" A3928 = "" A3929 = "" A3930 = "" +A3931 = "" A3932 = "" A3933 = "" A3934 = "" A3935 = "" A3936 = "" A3937 = "" A3938 = "" A3939 = "" A3940 = "" +A3941 = "" A3942 = "" A3943 = "" A3944 = "" A3945 = "" A3946 = "" A3947 = "" A3948 = "" A3949 = "" A3950 = "" +A3951 = "" A3952 = "" A3953 = "" A3954 = "" A3955 = "" A3956 = "" A3957 = "" A3958 = "" A3959 = "" A3960 = "" +A3961 = "" A3962 = "" A3963 = "" A3964 = "" A3965 = "" A3966 = "" A3967 = "" A3968 = "" A3969 = "" A3970 = "" +A3971 = "" A3972 = "" A3973 = "" A3974 = "" A3975 = "" A3976 = "" A3977 = "" A3978 = "" A3979 = "" A3980 = "" +A3981 = "" A3982 = "" A3983 = "" A3984 = "" A3985 = "" A3986 = "" A3987 = "" A3988 = "" A3989 = "" A3990 = "" +A3991 = "" A3992 = "" A3993 = "" A3994 = "" A3995 = "" A3996 = "" A3997 = "" A3998 = "" A3999 = "" A4000 = "" +A4001 = "" A4002 = "" A4003 = "" A4004 = "" A4005 = "" A4006 = "" A4007 = "" A4008 = "" A4009 = "" A4010 = "" +A4011 = "" A4012 = "" A4013 = "" A4014 = "" A4015 = "" A4016 = "" A4017 = "" A4018 = "" A4019 = "" A4020 = "" +A4021 = "" A4022 = "" A4023 = "" A4024 = "" A4025 = "" A4026 = "" A4027 = "" A4028 = "" A4029 = "" A4030 = "" +A4031 = "" A4032 = "" A4033 = "" A4034 = "" A4035 = "" A4036 = "" A4037 = "" A4038 = "" A4039 = "" A4040 = "" +A4041 = "" A4042 = "" A4043 = "" A4044 = "" A4045 = "" A4046 = "" A4047 = "" A4048 = "" A4049 = "" A4050 = "" +A4051 = "" A4052 = "" A4053 = "" A4054 = "" A4055 = "" A4056 = "" A4057 = "" A4058 = "" A4059 = "" A4060 = "" +A4061 = "" A4062 = "" A4063 = "" A4064 = "" A4065 = "" A4066 = "" A4067 = "" A4068 = "" A4069 = "" A4070 = "" +A4071 = "" A4072 = "" A4073 = "" A4074 = "" A4075 = "" A4076 = "" A4077 = "" A4078 = "" A4079 = "" A4080 = "" +A4081 = "" A4082 = "" A4083 = "" A4084 = "" A4085 = "" A4086 = "" A4087 = "" A4088 = "" A4089 = "" A4090 = "" +A4091 = "" A4092 = "" A4093 = "" A4094 = "" A4095 = "" A4096 = "" A4097 = "" A4098 = "" A4099 = "" A4100 = "" +A4101 = "" A4102 = "" A4103 = "" A4104 = "" A4105 = "" A4106 = "" A4107 = "" A4108 = "" A4109 = "" A4110 = "" +A4111 = "" A4112 = "" A4113 = "" A4114 = "" A4115 = "" A4116 = "" A4117 = "" A4118 = "" A4119 = "" A4120 = "" +A4121 = "" A4122 = "" A4123 = "" A4124 = "" A4125 = "" A4126 = "" A4127 = "" A4128 = "" A4129 = "" A4130 = "" +A4131 = "" A4132 = "" A4133 = "" A4134 = "" A4135 = "" A4136 = "" A4137 = "" A4138 = "" A4139 = "" A4140 = "" +A4141 = "" A4142 = "" A4143 = "" A4144 = "" A4145 = "" A4146 = "" A4147 = "" A4148 = "" A4149 = "" A4150 = "" +A4151 = "" A4152 = "" A4153 = "" A4154 = "" A4155 = "" A4156 = "" A4157 = "" A4158 = "" A4159 = "" A4160 = "" +A4161 = "" A4162 = "" A4163 = "" A4164 = "" A4165 = "" A4166 = "" A4167 = "" A4168 = "" A4169 = "" A4170 = "" +A4171 = "" A4172 = "" A4173 = "" A4174 = "" A4175 = "" A4176 = "" A4177 = "" A4178 = "" A4179 = "" A4180 = "" +A4181 = "" A4182 = "" A4183 = "" A4184 = "" A4185 = "" A4186 = "" A4187 = "" A4188 = "" A4189 = "" A4190 = "" +A4191 = "" A4192 = "" A4193 = "" A4194 = "" A4195 = "" A4196 = "" A4197 = "" A4198 = "" A4199 = "" A4200 = "" +A4201 = "" A4202 = "" A4203 = "" A4204 = "" A4205 = "" A4206 = "" A4207 = "" A4208 = "" A4209 = "" A4210 = "" +A4211 = "" A4212 = "" A4213 = "" A4214 = "" A4215 = "" A4216 = "" A4217 = "" A4218 = "" A4219 = "" A4220 = "" +A4221 = "" A4222 = "" A4223 = "" A4224 = "" A4225 = "" A4226 = "" A4227 = "" A4228 = "" A4229 = "" A4230 = "" +A4231 = "" A4232 = "" A4233 = "" A4234 = "" A4235 = "" A4236 = "" A4237 = "" A4238 = "" A4239 = "" A4240 = "" +A4241 = "" A4242 = "" A4243 = "" A4244 = "" A4245 = "" A4246 = "" A4247 = "" A4248 = "" A4249 = "" A4250 = "" +A4251 = "" A4252 = "" A4253 = "" A4254 = "" A4255 = "" A4256 = "" A4257 = "" A4258 = "" A4259 = "" A4260 = "" +A4261 = "" A4262 = "" A4263 = "" A4264 = "" A4265 = "" A4266 = "" A4267 = "" A4268 = "" A4269 = "" A4270 = "" +A4271 = "" A4272 = "" A4273 = "" A4274 = "" A4275 = "" A4276 = "" A4277 = "" A4278 = "" A4279 = "" A4280 = "" +A4281 = "" A4282 = "" A4283 = "" A4284 = "" A4285 = "" A4286 = "" A4287 = "" A4288 = "" A4289 = "" A4290 = "" +A4291 = "" A4292 = "" A4293 = "" A4294 = "" A4295 = "" A4296 = "" A4297 = "" A4298 = "" A4299 = "" A4300 = "" +A4301 = "" A4302 = "" A4303 = "" A4304 = "" A4305 = "" A4306 = "" A4307 = "" A4308 = "" A4309 = "" A4310 = "" +A4311 = "" A4312 = "" A4313 = "" A4314 = "" A4315 = "" A4316 = "" A4317 = "" A4318 = "" A4319 = "" A4320 = "" +A4321 = "" A4322 = "" A4323 = "" A4324 = "" A4325 = "" A4326 = "" A4327 = "" A4328 = "" A4329 = "" A4330 = "" +A4331 = "" A4332 = "" A4333 = "" A4334 = "" A4335 = "" A4336 = "" A4337 = "" A4338 = "" A4339 = "" A4340 = "" +A4341 = "" A4342 = "" A4343 = "" A4344 = "" A4345 = "" A4346 = "" A4347 = "" A4348 = "" A4349 = "" A4350 = "" +A4351 = "" A4352 = "" A4353 = "" A4354 = "" A4355 = "" A4356 = "" A4357 = "" A4358 = "" A4359 = "" A4360 = "" +A4361 = "" A4362 = "" A4363 = "" A4364 = "" A4365 = "" A4366 = "" A4367 = "" A4368 = "" A4369 = "" A4370 = "" +A4371 = "" A4372 = "" A4373 = "" A4374 = "" A4375 = "" A4376 = "" A4377 = "" A4378 = "" A4379 = "" A4380 = "" +A4381 = "" A4382 = "" A4383 = "" A4384 = "" A4385 = "" A4386 = "" A4387 = "" A4388 = "" A4389 = "" A4390 = "" +A4391 = "" A4392 = "" A4393 = "" A4394 = "" A4395 = "" A4396 = "" A4397 = "" A4398 = "" A4399 = "" A4400 = "" +A4401 = "" A4402 = "" A4403 = "" A4404 = "" A4405 = "" A4406 = "" A4407 = "" A4408 = "" A4409 = "" A4410 = "" +A4411 = "" A4412 = "" A4413 = "" A4414 = "" A4415 = "" A4416 = "" A4417 = "" A4418 = "" A4419 = "" A4420 = "" +A4421 = "" A4422 = "" A4423 = "" A4424 = "" A4425 = "" A4426 = "" A4427 = "" A4428 = "" A4429 = "" A4430 = "" +A4431 = "" A4432 = "" A4433 = "" A4434 = "" A4435 = "" A4436 = "" A4437 = "" A4438 = "" A4439 = "" A4440 = "" +A4441 = "" A4442 = "" A4443 = "" A4444 = "" A4445 = "" A4446 = "" A4447 = "" A4448 = "" A4449 = "" A4450 = "" +A4451 = "" A4452 = "" A4453 = "" A4454 = "" A4455 = "" A4456 = "" A4457 = "" A4458 = "" A4459 = "" A4460 = "" +A4461 = "" A4462 = "" A4463 = "" A4464 = "" A4465 = "" A4466 = "" A4467 = "" A4468 = "" A4469 = "" A4470 = "" +A4471 = "" A4472 = "" A4473 = "" A4474 = "" A4475 = "" A4476 = "" A4477 = "" A4478 = "" A4479 = "" A4480 = "" +A4481 = "" A4482 = "" A4483 = "" A4484 = "" A4485 = "" A4486 = "" A4487 = "" A4488 = "" A4489 = "" A4490 = "" +A4491 = "" A4492 = "" A4493 = "" A4494 = "" A4495 = "" A4496 = "" A4497 = "" A4498 = "" A4499 = "" A4500 = "" +A4501 = "" A4502 = "" A4503 = "" A4504 = "" A4505 = "" A4506 = "" A4507 = "" A4508 = "" A4509 = "" A4510 = "" +A4511 = "" A4512 = "" A4513 = "" A4514 = "" A4515 = "" A4516 = "" A4517 = "" A4518 = "" A4519 = "" A4520 = "" +A4521 = "" A4522 = "" A4523 = "" A4524 = "" A4525 = "" A4526 = "" A4527 = "" A4528 = "" A4529 = "" A4530 = "" +A4531 = "" A4532 = "" A4533 = "" A4534 = "" A4535 = "" A4536 = "" A4537 = "" A4538 = "" A4539 = "" A4540 = "" +A4541 = "" A4542 = "" A4543 = "" A4544 = "" A4545 = "" A4546 = "" A4547 = "" A4548 = "" A4549 = "" A4550 = "" +A4551 = "" A4552 = "" A4553 = "" A4554 = "" A4555 = "" A4556 = "" A4557 = "" A4558 = "" A4559 = "" A4560 = "" +A4561 = "" A4562 = "" A4563 = "" A4564 = "" A4565 = "" A4566 = "" A4567 = "" A4568 = "" A4569 = "" A4570 = "" +A4571 = "" A4572 = "" A4573 = "" A4574 = "" A4575 = "" A4576 = "" A4577 = "" A4578 = "" A4579 = "" A4580 = "" +A4581 = "" A4582 = "" A4583 = "" A4584 = "" A4585 = "" A4586 = "" A4587 = "" A4588 = "" A4589 = "" A4590 = "" +A4591 = "" A4592 = "" A4593 = "" A4594 = "" A4595 = "" A4596 = "" A4597 = "" A4598 = "" A4599 = "" A4600 = "" +A4601 = "" A4602 = "" A4603 = "" A4604 = "" A4605 = "" A4606 = "" A4607 = "" A4608 = "" A4609 = "" A4610 = "" +A4611 = "" A4612 = "" A4613 = "" A4614 = "" A4615 = "" A4616 = "" A4617 = "" A4618 = "" A4619 = "" A4620 = "" +A4621 = "" A4622 = "" A4623 = "" A4624 = "" A4625 = "" A4626 = "" A4627 = "" A4628 = "" A4629 = "" A4630 = "" +A4631 = "" A4632 = "" A4633 = "" A4634 = "" A4635 = "" A4636 = "" A4637 = "" A4638 = "" A4639 = "" A4640 = "" +A4641 = "" A4642 = "" A4643 = "" A4644 = "" A4645 = "" A4646 = "" A4647 = "" A4648 = "" A4649 = "" A4650 = "" +A4651 = "" A4652 = "" A4653 = "" A4654 = "" A4655 = "" A4656 = "" A4657 = "" A4658 = "" A4659 = "" A4660 = "" +A4661 = "" A4662 = "" A4663 = "" A4664 = "" A4665 = "" A4666 = "" A4667 = "" A4668 = "" A4669 = "" A4670 = "" +A4671 = "" A4672 = "" A4673 = "" A4674 = "" A4675 = "" A4676 = "" A4677 = "" A4678 = "" A4679 = "" A4680 = "" +A4681 = "" A4682 = "" A4683 = "" A4684 = "" A4685 = "" A4686 = "" A4687 = "" A4688 = "" A4689 = "" A4690 = "" +A4691 = "" A4692 = "" A4693 = "" A4694 = "" A4695 = "" A4696 = "" A4697 = "" A4698 = "" A4699 = "" A4700 = "" +A4701 = "" A4702 = "" A4703 = "" A4704 = "" A4705 = "" A4706 = "" A4707 = "" A4708 = "" A4709 = "" A4710 = "" +A4711 = "" A4712 = "" A4713 = "" A4714 = "" A4715 = "" A4716 = "" A4717 = "" A4718 = "" A4719 = "" A4720 = "" +A4721 = "" A4722 = "" A4723 = "" A4724 = "" A4725 = "" A4726 = "" A4727 = "" A4728 = "" A4729 = "" A4730 = "" +A4731 = "" A4732 = "" A4733 = "" A4734 = "" A4735 = "" A4736 = "" A4737 = "" A4738 = "" A4739 = "" A4740 = "" +A4741 = "" A4742 = "" A4743 = "" A4744 = "" A4745 = "" A4746 = "" A4747 = "" A4748 = "" A4749 = "" A4750 = "" +A4751 = "" A4752 = "" A4753 = "" A4754 = "" A4755 = "" A4756 = "" A4757 = "" A4758 = "" A4759 = "" A4760 = "" +A4761 = "" A4762 = "" A4763 = "" A4764 = "" A4765 = "" A4766 = "" A4767 = "" A4768 = "" A4769 = "" A4770 = "" +A4771 = "" A4772 = "" A4773 = "" A4774 = "" A4775 = "" A4776 = "" A4777 = "" A4778 = "" A4779 = "" A4780 = "" +A4781 = "" A4782 = "" A4783 = "" A4784 = "" A4785 = "" A4786 = "" A4787 = "" A4788 = "" A4789 = "" A4790 = "" +A4791 = "" A4792 = "" A4793 = "" A4794 = "" A4795 = "" A4796 = "" A4797 = "" A4798 = "" A4799 = "" A4800 = "" +A4801 = "" A4802 = "" A4803 = "" A4804 = "" A4805 = "" A4806 = "" A4807 = "" A4808 = "" A4809 = "" A4810 = "" +A4811 = "" A4812 = "" A4813 = "" A4814 = "" A4815 = "" A4816 = "" A4817 = "" A4818 = "" A4819 = "" A4820 = "" +A4821 = "" A4822 = "" A4823 = "" A4824 = "" A4825 = "" A4826 = "" A4827 = "" A4828 = "" A4829 = "" A4830 = "" +A4831 = "" A4832 = "" A4833 = "" A4834 = "" A4835 = "" A4836 = "" A4837 = "" A4838 = "" A4839 = "" A4840 = "" +A4841 = "" A4842 = "" A4843 = "" A4844 = "" A4845 = "" A4846 = "" A4847 = "" A4848 = "" A4849 = "" A4850 = "" +A4851 = "" A4852 = "" A4853 = "" A4854 = "" A4855 = "" A4856 = "" A4857 = "" A4858 = "" A4859 = "" A4860 = "" +A4861 = "" A4862 = "" A4863 = "" A4864 = "" A4865 = "" A4866 = "" A4867 = "" A4868 = "" A4869 = "" A4870 = "" +A4871 = "" A4872 = "" A4873 = "" A4874 = "" A4875 = "" A4876 = "" A4877 = "" A4878 = "" A4879 = "" A4880 = "" +A4881 = "" A4882 = "" A4883 = "" A4884 = "" A4885 = "" A4886 = "" A4887 = "" A4888 = "" A4889 = "" A4890 = "" +A4891 = "" A4892 = "" A4893 = "" A4894 = "" A4895 = "" A4896 = "" A4897 = "" A4898 = "" A4899 = "" A4900 = "" +A4901 = "" A4902 = "" A4903 = "" A4904 = "" A4905 = "" A4906 = "" A4907 = "" A4908 = "" A4909 = "" A4910 = "" +A4911 = "" A4912 = "" A4913 = "" A4914 = "" A4915 = "" A4916 = "" A4917 = "" A4918 = "" A4919 = "" A4920 = "" +A4921 = "" A4922 = "" A4923 = "" A4924 = "" A4925 = "" A4926 = "" A4927 = "" A4928 = "" A4929 = "" A4930 = "" +A4931 = "" A4932 = "" A4933 = "" A4934 = "" A4935 = "" A4936 = "" A4937 = "" A4938 = "" A4939 = "" A4940 = "" +A4941 = "" A4942 = "" A4943 = "" A4944 = "" A4945 = "" A4946 = "" A4947 = "" A4948 = "" A4949 = "" A4950 = "" +A4951 = "" A4952 = "" A4953 = "" A4954 = "" A4955 = "" A4956 = "" A4957 = "" A4958 = "" A4959 = "" A4960 = "" +A4961 = "" A4962 = "" A4963 = "" A4964 = "" A4965 = "" A4966 = "" A4967 = "" A4968 = "" A4969 = "" A4970 = "" +A4971 = "" A4972 = "" A4973 = "" A4974 = "" A4975 = "" A4976 = "" A4977 = "" A4978 = "" A4979 = "" A4980 = "" +A4981 = "" A4982 = "" A4983 = "" A4984 = "" A4985 = "" A4986 = "" A4987 = "" A4988 = "" A4989 = "" A4990 = "" +A4991 = "" A4992 = "" A4993 = "" A4994 = "" A4995 = "" A4996 = "" A4997 = "" A4998 = "" A4999 = "" A5000 = "" +A5001 = "" A5002 = "" A5003 = "" A5004 = "" A5005 = "" A5006 = "" A5007 = "" A5008 = "" A5009 = "" A5010 = "" +A5011 = "" A5012 = "" A5013 = "" A5014 = "" A5015 = "" A5016 = "" A5017 = "" A5018 = "" A5019 = "" A5020 = "" +A5021 = "" A5022 = "" A5023 = "" A5024 = "" A5025 = "" A5026 = "" A5027 = "" A5028 = "" A5029 = "" A5030 = "" +A5031 = "" A5032 = "" A5033 = "" A5034 = "" A5035 = "" A5036 = "" A5037 = "" A5038 = "" A5039 = "" A5040 = "" +A5041 = "" A5042 = "" A5043 = "" A5044 = "" A5045 = "" A5046 = "" A5047 = "" A5048 = "" A5049 = "" A5050 = "" +A5051 = "" A5052 = "" A5053 = "" A5054 = "" A5055 = "" A5056 = "" A5057 = "" A5058 = "" A5059 = "" A5060 = "" +A5061 = "" A5062 = "" A5063 = "" A5064 = "" A5065 = "" A5066 = "" A5067 = "" A5068 = "" A5069 = "" A5070 = "" +A5071 = "" A5072 = "" A5073 = "" A5074 = "" A5075 = "" A5076 = "" A5077 = "" A5078 = "" A5079 = "" A5080 = "" +A5081 = "" A5082 = "" A5083 = "" A5084 = "" A5085 = "" A5086 = "" A5087 = "" A5088 = "" A5089 = "" A5090 = "" +A5091 = "" A5092 = "" A5093 = "" A5094 = "" A5095 = "" A5096 = "" A5097 = "" A5098 = "" A5099 = "" A5100 = "" +A5101 = "" A5102 = "" A5103 = "" A5104 = "" A5105 = "" A5106 = "" A5107 = "" A5108 = "" A5109 = "" A5110 = "" +A5111 = "" A5112 = "" A5113 = "" A5114 = "" A5115 = "" A5116 = "" A5117 = "" A5118 = "" A5119 = "" A5120 = "" +A5121 = "" A5122 = "" A5123 = "" A5124 = "" A5125 = "" A5126 = "" A5127 = "" A5128 = "" A5129 = "" A5130 = "" +A5131 = "" A5132 = "" A5133 = "" A5134 = "" A5135 = "" A5136 = "" A5137 = "" A5138 = "" A5139 = "" A5140 = "" +A5141 = "" A5142 = "" A5143 = "" A5144 = "" A5145 = "" A5146 = "" A5147 = "" A5148 = "" A5149 = "" A5150 = "" +A5151 = "" A5152 = "" A5153 = "" A5154 = "" A5155 = "" A5156 = "" A5157 = "" A5158 = "" A5159 = "" A5160 = "" +A5161 = "" A5162 = "" A5163 = "" A5164 = "" A5165 = "" A5166 = "" A5167 = "" A5168 = "" A5169 = "" A5170 = "" +A5171 = "" A5172 = "" A5173 = "" A5174 = "" A5175 = "" A5176 = "" A5177 = "" A5178 = "" A5179 = "" A5180 = "" +A5181 = "" A5182 = "" A5183 = "" A5184 = "" A5185 = "" A5186 = "" A5187 = "" A5188 = "" A5189 = "" A5190 = "" +A5191 = "" A5192 = "" A5193 = "" A5194 = "" A5195 = "" A5196 = "" A5197 = "" A5198 = "" A5199 = "" A5200 = "" +A5201 = "" A5202 = "" A5203 = "" A5204 = "" A5205 = "" A5206 = "" A5207 = "" A5208 = "" A5209 = "" A5210 = "" +A5211 = "" A5212 = "" A5213 = "" A5214 = "" A5215 = "" A5216 = "" A5217 = "" A5218 = "" A5219 = "" A5220 = "" +A5221 = "" A5222 = "" A5223 = "" A5224 = "" A5225 = "" A5226 = "" A5227 = "" A5228 = "" A5229 = "" A5230 = "" +A5231 = "" A5232 = "" A5233 = "" A5234 = "" A5235 = "" A5236 = "" A5237 = "" A5238 = "" A5239 = "" A5240 = "" +A5241 = "" A5242 = "" A5243 = "" A5244 = "" A5245 = "" A5246 = "" A5247 = "" A5248 = "" A5249 = "" A5250 = "" +A5251 = "" A5252 = "" A5253 = "" A5254 = "" A5255 = "" A5256 = "" A5257 = "" A5258 = "" A5259 = "" A5260 = "" +A5261 = "" A5262 = "" A5263 = "" A5264 = "" A5265 = "" A5266 = "" A5267 = "" A5268 = "" A5269 = "" A5270 = "" +A5271 = "" A5272 = "" A5273 = "" A5274 = "" A5275 = "" A5276 = "" A5277 = "" A5278 = "" A5279 = "" A5280 = "" +A5281 = "" A5282 = "" A5283 = "" A5284 = "" A5285 = "" A5286 = "" A5287 = "" A5288 = "" A5289 = "" A5290 = "" +A5291 = "" A5292 = "" A5293 = "" A5294 = "" A5295 = "" A5296 = "" A5297 = "" A5298 = "" A5299 = "" A5300 = "" +A5301 = "" A5302 = "" A5303 = "" A5304 = "" A5305 = "" A5306 = "" A5307 = "" A5308 = "" A5309 = "" A5310 = "" +A5311 = "" A5312 = "" A5313 = "" A5314 = "" A5315 = "" A5316 = "" A5317 = "" A5318 = "" A5319 = "" A5320 = "" +A5321 = "" A5322 = "" A5323 = "" A5324 = "" A5325 = "" A5326 = "" A5327 = "" A5328 = "" A5329 = "" A5330 = "" +A5331 = "" A5332 = "" A5333 = "" A5334 = "" A5335 = "" A5336 = "" A5337 = "" A5338 = "" A5339 = "" A5340 = "" +A5341 = "" A5342 = "" A5343 = "" A5344 = "" A5345 = "" A5346 = "" A5347 = "" A5348 = "" A5349 = "" A5350 = "" +A5351 = "" A5352 = "" A5353 = "" A5354 = "" A5355 = "" A5356 = "" A5357 = "" A5358 = "" A5359 = "" A5360 = "" +A5361 = "" A5362 = "" A5363 = "" A5364 = "" A5365 = "" A5366 = "" A5367 = "" A5368 = "" A5369 = "" A5370 = "" +A5371 = "" A5372 = "" A5373 = "" A5374 = "" A5375 = "" A5376 = "" A5377 = "" A5378 = "" A5379 = "" A5380 = "" +A5381 = "" A5382 = "" A5383 = "" A5384 = "" A5385 = "" A5386 = "" A5387 = "" A5388 = "" A5389 = "" A5390 = "" +A5391 = "" A5392 = "" A5393 = "" A5394 = "" A5395 = "" A5396 = "" A5397 = "" A5398 = "" A5399 = "" A5400 = "" +A5401 = "" A5402 = "" A5403 = "" A5404 = "" A5405 = "" A5406 = "" A5407 = "" A5408 = "" A5409 = "" A5410 = "" +A5411 = "" A5412 = "" A5413 = "" A5414 = "" A5415 = "" A5416 = "" A5417 = "" A5418 = "" A5419 = "" A5420 = "" +A5421 = "" A5422 = "" A5423 = "" A5424 = "" A5425 = "" A5426 = "" A5427 = "" A5428 = "" A5429 = "" A5430 = "" +A5431 = "" A5432 = "" A5433 = "" A5434 = "" A5435 = "" A5436 = "" A5437 = "" A5438 = "" A5439 = "" A5440 = "" +A5441 = "" A5442 = "" A5443 = "" A5444 = "" A5445 = "" A5446 = "" A5447 = "" A5448 = "" A5449 = "" A5450 = "" +A5451 = "" A5452 = "" A5453 = "" A5454 = "" A5455 = "" A5456 = "" A5457 = "" A5458 = "" A5459 = "" A5460 = "" +A5461 = "" A5462 = "" A5463 = "" A5464 = "" A5465 = "" A5466 = "" A5467 = "" A5468 = "" A5469 = "" A5470 = "" +A5471 = "" A5472 = "" A5473 = "" A5474 = "" A5475 = "" A5476 = "" A5477 = "" A5478 = "" A5479 = "" A5480 = "" +A5481 = "" A5482 = "" A5483 = "" A5484 = "" A5485 = "" A5486 = "" A5487 = "" A5488 = "" A5489 = "" A5490 = "" +A5491 = "" A5492 = "" A5493 = "" A5494 = "" A5495 = "" A5496 = "" A5497 = "" A5498 = "" A5499 = "" A5500 = "" +A5501 = "" A5502 = "" A5503 = "" A5504 = "" A5505 = "" A5506 = "" A5507 = "" A5508 = "" A5509 = "" A5510 = "" +A5511 = "" A5512 = "" A5513 = "" A5514 = "" A5515 = "" A5516 = "" A5517 = "" A5518 = "" A5519 = "" A5520 = "" +A5521 = "" A5522 = "" A5523 = "" A5524 = "" A5525 = "" A5526 = "" A5527 = "" A5528 = "" A5529 = "" A5530 = "" +A5531 = "" A5532 = "" A5533 = "" A5534 = "" A5535 = "" A5536 = "" A5537 = "" A5538 = "" A5539 = "" A5540 = "" +A5541 = "" A5542 = "" A5543 = "" A5544 = "" A5545 = "" A5546 = "" A5547 = "" A5548 = "" A5549 = "" A5550 = "" +A5551 = "" A5552 = "" A5553 = "" A5554 = "" A5555 = "" A5556 = "" A5557 = "" A5558 = "" A5559 = "" A5560 = "" +A5561 = "" A5562 = "" A5563 = "" A5564 = "" A5565 = "" A5566 = "" A5567 = "" A5568 = "" A5569 = "" A5570 = "" +A5571 = "" A5572 = "" A5573 = "" A5574 = "" A5575 = "" A5576 = "" A5577 = "" A5578 = "" A5579 = "" A5580 = "" +A5581 = "" A5582 = "" A5583 = "" A5584 = "" A5585 = "" A5586 = "" A5587 = "" A5588 = "" A5589 = "" A5590 = "" +A5591 = "" A5592 = "" A5593 = "" A5594 = "" A5595 = "" A5596 = "" A5597 = "" A5598 = "" A5599 = "" A5600 = "" +A5601 = "" A5602 = "" A5603 = "" A5604 = "" A5605 = "" A5606 = "" A5607 = "" A5608 = "" A5609 = "" A5610 = "" +A5611 = "" A5612 = "" A5613 = "" A5614 = "" A5615 = "" A5616 = "" A5617 = "" A5618 = "" A5619 = "" A5620 = "" +A5621 = "" A5622 = "" A5623 = "" A5624 = "" A5625 = "" A5626 = "" A5627 = "" A5628 = "" A5629 = "" A5630 = "" +A5631 = "" A5632 = "" A5633 = "" A5634 = "" A5635 = "" A5636 = "" A5637 = "" A5638 = "" A5639 = "" A5640 = "" +A5641 = "" A5642 = "" A5643 = "" A5644 = "" A5645 = "" A5646 = "" A5647 = "" A5648 = "" A5649 = "" A5650 = "" +A5651 = "" A5652 = "" A5653 = "" A5654 = "" A5655 = "" A5656 = "" A5657 = "" A5658 = "" A5659 = "" A5660 = "" +A5661 = "" A5662 = "" A5663 = "" A5664 = "" A5665 = "" A5666 = "" A5667 = "" A5668 = "" A5669 = "" A5670 = "" +A5671 = "" A5672 = "" A5673 = "" A5674 = "" A5675 = "" A5676 = "" A5677 = "" A5678 = "" A5679 = "" A5680 = "" +A5681 = "" A5682 = "" A5683 = "" A5684 = "" A5685 = "" A5686 = "" A5687 = "" A5688 = "" A5689 = "" A5690 = "" +A5691 = "" A5692 = "" A5693 = "" A5694 = "" A5695 = "" A5696 = "" A5697 = "" A5698 = "" A5699 = "" A5700 = "" +A5701 = "" A5702 = "" A5703 = "" A5704 = "" A5705 = "" A5706 = "" A5707 = "" A5708 = "" A5709 = "" A5710 = "" +A5711 = "" A5712 = "" A5713 = "" A5714 = "" A5715 = "" A5716 = "" A5717 = "" A5718 = "" A5719 = "" A5720 = "" +A5721 = "" A5722 = "" A5723 = "" A5724 = "" A5725 = "" A5726 = "" A5727 = "" A5728 = "" A5729 = "" A5730 = "" +A5731 = "" A5732 = "" A5733 = "" A5734 = "" A5735 = "" A5736 = "" A5737 = "" A5738 = "" A5739 = "" A5740 = "" +A5741 = "" A5742 = "" A5743 = "" A5744 = "" A5745 = "" A5746 = "" A5747 = "" A5748 = "" A5749 = "" A5750 = "" +A5751 = "" A5752 = "" A5753 = "" A5754 = "" A5755 = "" A5756 = "" A5757 = "" A5758 = "" A5759 = "" A5760 = "" +A5761 = "" A5762 = "" A5763 = "" A5764 = "" A5765 = "" A5766 = "" A5767 = "" A5768 = "" A5769 = "" A5770 = "" +A5771 = "" A5772 = "" A5773 = "" A5774 = "" A5775 = "" A5776 = "" A5777 = "" A5778 = "" A5779 = "" A5780 = "" +A5781 = "" A5782 = "" A5783 = "" A5784 = "" A5785 = "" A5786 = "" A5787 = "" A5788 = "" A5789 = "" A5790 = "" +A5791 = "" A5792 = "" A5793 = "" A5794 = "" A5795 = "" A5796 = "" A5797 = "" A5798 = "" A5799 = "" A5800 = "" +A5801 = "" A5802 = "" A5803 = "" A5804 = "" A5805 = "" A5806 = "" A5807 = "" A5808 = "" A5809 = "" A5810 = "" +A5811 = "" A5812 = "" A5813 = "" A5814 = "" A5815 = "" A5816 = "" A5817 = "" A5818 = "" A5819 = "" A5820 = "" +A5821 = "" A5822 = "" A5823 = "" A5824 = "" A5825 = "" A5826 = "" A5827 = "" A5828 = "" A5829 = "" A5830 = "" +A5831 = "" A5832 = "" A5833 = "" A5834 = "" A5835 = "" A5836 = "" A5837 = "" A5838 = "" A5839 = "" A5840 = "" +A5841 = "" A5842 = "" A5843 = "" A5844 = "" A5845 = "" A5846 = "" A5847 = "" A5848 = "" A5849 = "" A5850 = "" +A5851 = "" A5852 = "" A5853 = "" A5854 = "" A5855 = "" A5856 = "" A5857 = "" A5858 = "" A5859 = "" A5860 = "" +A5861 = "" A5862 = "" A5863 = "" A5864 = "" A5865 = "" A5866 = "" A5867 = "" A5868 = "" A5869 = "" A5870 = "" +A5871 = "" A5872 = "" A5873 = "" A5874 = "" A5875 = "" A5876 = "" A5877 = "" A5878 = "" A5879 = "" A5880 = "" +A5881 = "" A5882 = "" A5883 = "" A5884 = "" A5885 = "" A5886 = "" A5887 = "" A5888 = "" A5889 = "" A5890 = "" +A5891 = "" A5892 = "" A5893 = "" A5894 = "" A5895 = "" A5896 = "" A5897 = "" A5898 = "" A5899 = "" A5900 = "" +A5901 = "" A5902 = "" A5903 = "" A5904 = "" A5905 = "" A5906 = "" A5907 = "" A5908 = "" A5909 = "" A5910 = "" +A5911 = "" A5912 = "" A5913 = "" A5914 = "" A5915 = "" A5916 = "" A5917 = "" A5918 = "" A5919 = "" A5920 = "" +A5921 = "" A5922 = "" A5923 = "" A5924 = "" A5925 = "" A5926 = "" A5927 = "" A5928 = "" A5929 = "" A5930 = "" +A5931 = "" A5932 = "" A5933 = "" A5934 = "" A5935 = "" A5936 = "" A5937 = "" A5938 = "" A5939 = "" A5940 = "" +A5941 = "" A5942 = "" A5943 = "" A5944 = "" A5945 = "" A5946 = "" A5947 = "" A5948 = "" A5949 = "" A5950 = "" +A5951 = "" A5952 = "" A5953 = "" A5954 = "" A5955 = "" A5956 = "" A5957 = "" A5958 = "" A5959 = "" A5960 = "" +A5961 = "" A5962 = "" A5963 = "" A5964 = "" A5965 = "" A5966 = "" A5967 = "" A5968 = "" A5969 = "" A5970 = "" +A5971 = "" A5972 = "" A5973 = "" A5974 = "" A5975 = "" A5976 = "" A5977 = "" A5978 = "" A5979 = "" A5980 = "" +A5981 = "" A5982 = "" A5983 = "" A5984 = "" A5985 = "" A5986 = "" A5987 = "" A5988 = "" A5989 = "" A5990 = "" +A5991 = "" A5992 = "" A5993 = "" A5994 = "" A5995 = "" A5996 = "" A5997 = "" A5998 = "" A5999 = "" A6000 = "" +A6001 = "" A6002 = "" A6003 = "" A6004 = "" A6005 = "" A6006 = "" A6007 = "" A6008 = "" A6009 = "" A6010 = "" +A6011 = "" A6012 = "" A6013 = "" A6014 = "" A6015 = "" A6016 = "" A6017 = "" A6018 = "" A6019 = "" A6020 = "" +A6021 = "" A6022 = "" A6023 = "" A6024 = "" A6025 = "" A6026 = "" A6027 = "" A6028 = "" A6029 = "" A6030 = "" +A6031 = "" A6032 = "" A6033 = "" A6034 = "" A6035 = "" A6036 = "" A6037 = "" A6038 = "" A6039 = "" A6040 = "" +A6041 = "" A6042 = "" A6043 = "" A6044 = "" A6045 = "" A6046 = "" A6047 = "" A6048 = "" A6049 = "" A6050 = "" +A6051 = "" A6052 = "" A6053 = "" A6054 = "" A6055 = "" A6056 = "" A6057 = "" A6058 = "" A6059 = "" A6060 = "" +A6061 = "" A6062 = "" A6063 = "" A6064 = "" A6065 = "" A6066 = "" A6067 = "" A6068 = "" A6069 = "" A6070 = "" +A6071 = "" A6072 = "" A6073 = "" A6074 = "" A6075 = "" A6076 = "" A6077 = "" A6078 = "" A6079 = "" A6080 = "" +A6081 = "" A6082 = "" A6083 = "" A6084 = "" A6085 = "" A6086 = "" A6087 = "" A6088 = "" A6089 = "" A6090 = "" +A6091 = "" A6092 = "" A6093 = "" A6094 = "" A6095 = "" A6096 = "" A6097 = "" A6098 = "" A6099 = "" A6100 = "" +A6101 = "" A6102 = "" A6103 = "" A6104 = "" A6105 = "" A6106 = "" A6107 = "" A6108 = "" A6109 = "" A6110 = "" +A6111 = "" A6112 = "" A6113 = "" A6114 = "" A6115 = "" A6116 = "" A6117 = "" A6118 = "" A6119 = "" A6120 = "" +A6121 = "" A6122 = "" A6123 = "" A6124 = "" A6125 = "" A6126 = "" A6127 = "" A6128 = "" A6129 = "" A6130 = "" +A6131 = "" A6132 = "" A6133 = "" A6134 = "" A6135 = "" A6136 = "" A6137 = "" A6138 = "" A6139 = "" A6140 = "" +A6141 = "" A6142 = "" A6143 = "" A6144 = "" A6145 = "" A6146 = "" A6147 = "" A6148 = "" A6149 = "" A6150 = "" +A6151 = "" A6152 = "" A6153 = "" A6154 = "" A6155 = "" A6156 = "" A6157 = "" A6158 = "" A6159 = "" A6160 = "" +A6161 = "" A6162 = "" A6163 = "" A6164 = "" A6165 = "" A6166 = "" A6167 = "" A6168 = "" A6169 = "" A6170 = "" +A6171 = "" A6172 = "" A6173 = "" A6174 = "" A6175 = "" A6176 = "" A6177 = "" A6178 = "" A6179 = "" A6180 = "" +A6181 = "" A6182 = "" A6183 = "" A6184 = "" A6185 = "" A6186 = "" A6187 = "" A6188 = "" A6189 = "" A6190 = "" +A6191 = "" A6192 = "" A6193 = "" A6194 = "" A6195 = "" A6196 = "" A6197 = "" A6198 = "" A6199 = "" A6200 = "" +A6201 = "" A6202 = "" A6203 = "" A6204 = "" A6205 = "" A6206 = "" A6207 = "" A6208 = "" A6209 = "" A6210 = "" +A6211 = "" A6212 = "" A6213 = "" A6214 = "" A6215 = "" A6216 = "" A6217 = "" A6218 = "" A6219 = "" A6220 = "" +A6221 = "" A6222 = "" A6223 = "" A6224 = "" A6225 = "" A6226 = "" A6227 = "" A6228 = "" A6229 = "" A6230 = "" +A6231 = "" A6232 = "" A6233 = "" A6234 = "" A6235 = "" A6236 = "" A6237 = "" A6238 = "" A6239 = "" A6240 = "" +A6241 = "" A6242 = "" A6243 = "" A6244 = "" A6245 = "" A6246 = "" A6247 = "" A6248 = "" A6249 = "" A6250 = "" +A6251 = "" A6252 = "" A6253 = "" A6254 = "" A6255 = "" A6256 = "" A6257 = "" A6258 = "" A6259 = "" A6260 = "" +A6261 = "" A6262 = "" A6263 = "" A6264 = "" A6265 = "" A6266 = "" A6267 = "" A6268 = "" A6269 = "" A6270 = "" +A6271 = "" A6272 = "" A6273 = "" A6274 = "" A6275 = "" A6276 = "" A6277 = "" A6278 = "" A6279 = "" A6280 = "" +A6281 = "" A6282 = "" A6283 = "" A6284 = "" A6285 = "" A6286 = "" A6287 = "" A6288 = "" A6289 = "" A6290 = "" +A6291 = "" A6292 = "" A6293 = "" A6294 = "" A6295 = "" A6296 = "" A6297 = "" A6298 = "" A6299 = "" A6300 = "" +A6301 = "" A6302 = "" A6303 = "" A6304 = "" A6305 = "" A6306 = "" A6307 = "" A6308 = "" A6309 = "" A6310 = "" +A6311 = "" A6312 = "" A6313 = "" A6314 = "" A6315 = "" A6316 = "" A6317 = "" A6318 = "" A6319 = "" A6320 = "" +A6321 = "" A6322 = "" A6323 = "" A6324 = "" A6325 = "" A6326 = "" A6327 = "" A6328 = "" A6329 = "" A6330 = "" +A6331 = "" A6332 = "" A6333 = "" A6334 = "" A6335 = "" A6336 = "" A6337 = "" A6338 = "" A6339 = "" A6340 = "" +A6341 = "" A6342 = "" A6343 = "" A6344 = "" A6345 = "" A6346 = "" A6347 = "" A6348 = "" A6349 = "" A6350 = "" +A6351 = "" A6352 = "" A6353 = "" A6354 = "" A6355 = "" A6356 = "" A6357 = "" A6358 = "" A6359 = "" A6360 = "" +A6361 = "" A6362 = "" A6363 = "" A6364 = "" A6365 = "" A6366 = "" A6367 = "" A6368 = "" A6369 = "" A6370 = "" +A6371 = "" A6372 = "" A6373 = "" A6374 = "" A6375 = "" A6376 = "" A6377 = "" A6378 = "" A6379 = "" A6380 = "" +A6381 = "" A6382 = "" A6383 = "" A6384 = "" A6385 = "" A6386 = "" A6387 = "" A6388 = "" A6389 = "" A6390 = "" +A6391 = "" A6392 = "" A6393 = "" A6394 = "" A6395 = "" A6396 = "" A6397 = "" A6398 = "" A6399 = "" A6400 = "" +A6401 = "" A6402 = "" A6403 = "" A6404 = "" A6405 = "" A6406 = "" A6407 = "" A6408 = "" A6409 = "" A6410 = "" +A6411 = "" A6412 = "" A6413 = "" A6414 = "" A6415 = "" A6416 = "" A6417 = "" A6418 = "" A6419 = "" A6420 = "" +A6421 = "" A6422 = "" A6423 = "" A6424 = "" A6425 = "" A6426 = "" A6427 = "" A6428 = "" A6429 = "" A6430 = "" +A6431 = "" A6432 = "" A6433 = "" A6434 = "" A6435 = "" A6436 = "" A6437 = "" A6438 = "" A6439 = "" A6440 = "" +A6441 = "" A6442 = "" A6443 = "" A6444 = "" A6445 = "" A6446 = "" A6447 = "" A6448 = "" A6449 = "" A6450 = "" +A6451 = "" A6452 = "" A6453 = "" A6454 = "" A6455 = "" A6456 = "" A6457 = "" A6458 = "" A6459 = "" A6460 = "" +A6461 = "" A6462 = "" A6463 = "" A6464 = "" A6465 = "" A6466 = "" A6467 = "" A6468 = "" A6469 = "" A6470 = "" +A6471 = "" A6472 = "" A6473 = "" A6474 = "" A6475 = "" A6476 = "" A6477 = "" A6478 = "" A6479 = "" A6480 = "" +A6481 = "" A6482 = "" A6483 = "" A6484 = "" A6485 = "" A6486 = "" A6487 = "" A6488 = "" A6489 = "" A6490 = "" +A6491 = "" A6492 = "" A6493 = "" A6494 = "" A6495 = "" A6496 = "" A6497 = "" A6498 = "" A6499 = "" A6500 = "" +A6501 = "" A6502 = "" A6503 = "" A6504 = "" A6505 = "" A6506 = "" A6507 = "" A6508 = "" A6509 = "" A6510 = "" +A6511 = "" A6512 = "" A6513 = "" A6514 = "" A6515 = "" A6516 = "" A6517 = "" A6518 = "" A6519 = "" A6520 = "" +A6521 = "" A6522 = "" A6523 = "" A6524 = "" A6525 = "" A6526 = "" A6527 = "" A6528 = "" A6529 = "" A6530 = "" +A6531 = "" A6532 = "" A6533 = "" A6534 = "" A6535 = "" A6536 = "" A6537 = "" A6538 = "" A6539 = "" A6540 = "" +A6541 = "" A6542 = "" A6543 = "" A6544 = "" A6545 = "" A6546 = "" A6547 = "" A6548 = "" A6549 = "" A6550 = "" +A6551 = "" A6552 = "" A6553 = "" A6554 = "" A6555 = "" A6556 = "" A6557 = "" A6558 = "" A6559 = "" A6560 = "" +A6561 = "" A6562 = "" A6563 = "" A6564 = "" A6565 = "" A6566 = "" A6567 = "" A6568 = "" A6569 = "" A6570 = "" +A6571 = "" A6572 = "" A6573 = "" A6574 = "" A6575 = "" A6576 = "" A6577 = "" A6578 = "" A6579 = "" A6580 = "" +A6581 = "" A6582 = "" A6583 = "" A6584 = "" A6585 = "" A6586 = "" A6587 = "" A6588 = "" A6589 = "" A6590 = "" +A6591 = "" A6592 = "" A6593 = "" A6594 = "" A6595 = "" A6596 = "" A6597 = "" A6598 = "" A6599 = "" A6600 = "" +A6601 = "" A6602 = "" A6603 = "" A6604 = "" A6605 = "" A6606 = "" A6607 = "" A6608 = "" A6609 = "" A6610 = "" +A6611 = "" A6612 = "" A6613 = "" A6614 = "" A6615 = "" A6616 = "" A6617 = "" A6618 = "" A6619 = "" A6620 = "" +A6621 = "" A6622 = "" A6623 = "" A6624 = "" A6625 = "" A6626 = "" A6627 = "" A6628 = "" A6629 = "" A6630 = "" +A6631 = "" A6632 = "" A6633 = "" A6634 = "" A6635 = &quo