--- old/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/SAXTFactoryTest004.java 2014-12-31 11:40:09.240038837 -0800 +++ new/test/javax/xml/jaxp/functional/javax/xml/transform/ptests/SAXTFactoryTest004.java 2014-12-31 11:40:09.167038723 -0800 @@ -32,7 +32,7 @@ import javax.xml.transform.dom.DOMSource; import static javax.xml.transform.ptests.TransformerTestConst.XML_DIR; import javax.xml.transform.sax.SAXTransformerFactory; -import static jaxp.library.JAXPTestUtilities.failUnexpected; +import jaxp.library.JAXPFileBaseTest; import org.testng.annotations.Test; import org.w3c.dom.Document; import org.xml.sax.SAXException; @@ -41,25 +41,29 @@ * TransformerConfigurationException expected when there is relative URI is used * in citiesinclude.xsl file */ -public class SAXTFactoryTest004 { +public class SAXTFactoryTest004 extends JAXPFileBaseTest { /** * Negative test for newTransformerHandler when relative URI is in XML file. + * * @throws TransformerConfigurationException If for some reason the * TransformerHandler can not be created. + * @throws SAXException If any parse errors occur. + * @throws IOException if the file exists but is a directory rather than + * a regular file, does not exist but cannot be created, or cannot + * be opened for any other reason. + * @throws ParserConfigurationException if a DocumentBuilder cannot be + * created which satisfies the configuration requested. */ @Test(expectedExceptions = TransformerConfigurationException.class) - public void transformerHandlerTest01() throws TransformerConfigurationException { - try { - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - DocumentBuilder docBuilder = dbf.newDocumentBuilder(); - Document document = docBuilder.parse(new File(XML_DIR + "citiesinclude.xsl")); - DOMSource domSource= new DOMSource(document); - SAXTransformerFactory saxTFactory - = (SAXTransformerFactory)TransformerFactory.newInstance(); - saxTFactory.newTransformerHandler(domSource); - } catch (ParserConfigurationException | IOException | SAXException ex) { - failUnexpected(ex); - } + public void transformerHandlerTest01() throws TransformerConfigurationException, + ParserConfigurationException, SAXException, IOException { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware(true); + DocumentBuilder docBuilder = dbf.newDocumentBuilder(); + Document document = docBuilder.parse(new File(XML_DIR + "citiesinclude.xsl")); + DOMSource domSource= new DOMSource(document); + SAXTransformerFactory saxTFactory + = (SAXTransformerFactory)TransformerFactory.newInstance(); + saxTFactory.newTransformerHandler(domSource); } }