changeset 975:16ba98d804eb

Merge
author lana
date Thu, 11 Aug 2016 17:02:17 +0000
parents 931efd66f840 2e81820b5653
children 411e97c592d9 907445d85e68
files
diffstat 4 files changed, 15 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/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/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
--- a/test/TEST.ROOT	Thu Aug 11 15:47:08 2016 +0000
+++ b/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
--- a/test/javax/xml/jaxp/libs/jaxp/library/BasePolicy.java	Thu Aug 11 15:47:08 2016 +0000
+++ b/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);
         }
     }
 
--- a/test/javax/xml/jaxp/unittest/validation/Bug6773084Test.java	Thu Aug 11 15:47:08 2016 +0000
+++ b/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) {