--- old/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest.java 2016-07-21 20:33:05.959027778 -0700 +++ new/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/TransformerTest.java 2016-07-21 20:33:05.835027778 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -22,9 +22,15 @@ */ package javax.xml.transform.ptests; +import static javax.xml.transform.ptests.TransformerTestConst.XML_DIR; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; + import java.io.File; import java.io.FileInputStream; import java.util.Properties; + import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.ErrorListener; @@ -33,13 +39,10 @@ import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; -import static javax.xml.transform.ptests.TransformerTestConst.XML_DIR; import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stream.StreamSource; -import jaxp.library.JAXPFileReadOnlyBaseTest; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertTrue; + +import org.testng.annotations.Listeners; import org.testng.annotations.Test; import org.w3c.dom.Document; import org.xml.sax.InputSource; @@ -47,7 +50,8 @@ /** * Basic test cases for Transformer API */ -public class TransformerTest extends JAXPFileReadOnlyBaseTest { +@Listeners({jaxp.library.FilePolicy.class}) +public class TransformerTest { /** * XSLT file serves every test method. */ @@ -58,7 +62,7 @@ * @throws TransformerConfigurationException If for some reason the * TransformerHandler can not be created. */ - @Test (groups = {"readLocalFiles"}) + @Test public void transformer01() throws TransformerConfigurationException { TransformerFactory tfactory = TransformerFactory.newInstance(); StreamSource streamSource = new StreamSource( @@ -71,7 +75,7 @@ * This tests if newTransformer(SAXSource) method returns Transformer. * @throws Exception If any errors occur. */ - @Test (groups = {"readLocalFiles"}) + @Test public void transformer02() throws Exception { try (FileInputStream fis = new FileInputStream(TEST_XSL)) { TransformerFactory tfactory = TransformerFactory.newInstance(); @@ -86,7 +90,7 @@ * * @throws Exception If any errors occur. */ - @Test (groups = {"readLocalFiles"}) + @Test public void transformer03() throws Exception { TransformerFactory tfactory = TransformerFactory.newInstance(); @@ -105,7 +109,7 @@ * * @throws Exception If any errors occur. */ - @Test (groups = {"readLocalFiles"}) + @Test public void transformer04() throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); @@ -125,7 +129,7 @@ * * @throws Exception If any errors occur. */ - @Test (groups = {"readLocalFiles"}) + @Test public void transformer05() throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); @@ -150,7 +154,7 @@ * * @throws Exception If any errors occur. */ - @Test (groups = {"readLocalFiles"}) + @Test public void transformer06() throws Exception { TransformerFactory tfactory = TransformerFactory.newInstance();