# HG changeset patch # User lana # Date 1470934937 0 # Node ID 5cb21ed83e3df9f8a270589c7bf2b1af26ae87c1 # Parent f26b656c2224871417e39cf653e2c4171dde9e9f# Parent bcb68f9b7b343655d609ec55dad92e50d9d23935 Merge diff -r f26b656c2224 -r 5cb21ed83e3d jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message.properties --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message.properties Thu Aug 11 15:47:08 2016 +0000 +++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xpath/regex/message.properties Thu Aug 11 17:02:17 2016 +0000 @@ -37,5 +37,3 @@ parser.quantifier.3=Invalid quantifier. A digit or '}' is expected. parser.quantifier.4=Invalid quantifier. A min quantity must be <= a max quantity. parser.quantifier.5=Invalid quantifier. A quantity value overflow. -null -null diff -r f26b656c2224 -r 5cb21ed83e3d jaxp/test/TEST.ROOT --- a/jaxp/test/TEST.ROOT Thu Aug 11 15:47:08 2016 +0000 +++ b/jaxp/test/TEST.ROOT Thu Aug 11 17:02:17 2016 +0000 @@ -23,4 +23,7 @@ groups=TEST.groups # Minimum jtreg version -requiredVersion=4.2 b02 +requiredVersion=4.2 b03 + +# Use new module options +useNewOptions=true diff -r f26b656c2224 -r 5cb21ed83e3d jaxp/test/javax/xml/jaxp/libs/jaxp/library/BasePolicy.java --- a/jaxp/test/javax/xml/jaxp/libs/jaxp/library/BasePolicy.java Thu Aug 11 15:47:08 2016 +0000 +++ b/jaxp/test/javax/xml/jaxp/libs/jaxp/library/BasePolicy.java Thu Aug 11 17:02:17 2016 +0000 @@ -37,7 +37,7 @@ try { JAXPPolicyManager.teardownPolicyManager(); } catch (Exception e) { - throw new RuntimeException("Failed to teardonw the policy manager", e); + throw new RuntimeException("Failed to teardown the policy manager", e); } } diff -r f26b656c2224 -r 5cb21ed83e3d jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java --- a/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java Thu Aug 11 15:47:08 2016 +0000 +++ b/jaxp/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java Thu Aug 11 17:02:17 2016 +0000 @@ -32,11 +32,10 @@ import java.util.concurrent.CyclicBarrier; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; import javax.xml.XMLConstants; -import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Source; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamSource; @@ -69,6 +68,7 @@ private static final ExecutorService EXEC = Executors.newCachedThreadPool(); private static final CyclicBarrier BARRIER = new CyclicBarrier(NTHREADS); + private static final int TIMEOUT = 110; public static final String IN_FOLDER = Bug6773084Test.class.getResource("Bug6773084In").getPath(); public static final String XSD_PATH = Bug6773084Test.class.getResource("Bug6773084.xsd").getPath(); @@ -93,20 +93,23 @@ } }); + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware(true); + for (int i = 0; i < files.length; i++) { - EXEC.execute(new XMLValiddator(files[i], i)); + EXEC.execute(new XMLValiddator(dbf.newDocumentBuilder().parse(files[i]), i)); } runWithAllPerm(() -> EXEC.shutdown()); - + EXEC.awaitTermination(TIMEOUT, TimeUnit.SECONDS); } private static class XMLValiddator implements Runnable { - private File file; + private Document document; private int index; - public XMLValiddator(File file, int index) { - this.file = file; + public XMLValiddator(Document document, int index) { + this.document = document; this.index = index; } @@ -117,23 +120,14 @@ BARRIER.await(); System.out.println("Validating...."); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setNamespaceAware(true); - - DocumentBuilder builder = factory.newDocumentBuilder(); - Document document = builder.parse(file); - Validator validator = schema.newValidator(); validator.setErrorHandler(new ErrorHandlerImpl()); validator.validate(new DOMSource(document)); - } catch (IOException e) { e.printStackTrace(); } catch (SAXException e) { e.printStackTrace(); Assert.fail("Test failed."); - } catch (ParserConfigurationException e) { - e.printStackTrace(); } catch (BrokenBarrierException e) { e.printStackTrace(); } catch (InterruptedException e) {