--- old/test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java 2016-08-31 19:32:43.610291605 +0300 +++ new/test/javax/xml/jaxp/unittest/common/TransformationWarningsTest.java 2016-08-31 19:32:43.526291526 +0300 @@ -42,12 +42,13 @@ * @test * @bug 8144593 * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest + * @compile -XDignore.symbol.file TestSAXDriver.java * @run testng/othervm -DrunSecMngr=true common.TransformationWarningsTest * @run testng/othervm common.TransformationWarningsTest * @summary Check that warnings about unsupported properties from parsers * are suppressed during the transformation process. */ -@Listeners({jaxp.library.BasePolicy.class}) +@Listeners({jaxp.library.BasePolicy.class, jaxp.library.InternalAPIPolicy.class}) public class TransformationWarningsTest extends WarningsTestBase { @BeforeClass @@ -80,7 +81,12 @@ Source xslsrc = new StreamSource(new StringReader(xsl)); // Create factory and transformer - TransformerFactory tf = TransformerFactory.newInstance(); + TransformerFactory tf; + // newTransformer() method doc states that different transformer + // factories can be used concurrently by different Threads. + synchronized (TransformerFactory.class) { + tf = TransformerFactory.newInstance(); + } Transformer t = tf.newTransformer(xslsrc); // Set URI Resolver to return the newly constructed xml