--- old/test/javax/xml/jaxp/unittest/common/Sources.java 2016-07-21 20:33:39.410027778 -0700 +++ new/test/javax/xml/jaxp/unittest/common/Sources.java 2016-07-21 20:33:39.261027778 -0700 @@ -24,9 +24,11 @@ import java.io.ByteArrayInputStream; import java.io.File; +import java.io.FilePermission; import java.io.StringReader; import java.io.UnsupportedEncodingException; import java.net.URISyntaxException; + import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; @@ -39,8 +41,12 @@ import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stax.StAXSource; import javax.xml.transform.stream.StreamSource; + +import jaxp.library.JAXPTestUtilities; + import org.testng.Assert; import org.testng.annotations.DataProvider; +import org.testng.annotations.Listeners; import org.testng.annotations.Test; import org.w3c.dom.Document; import org.xml.sax.InputSource; @@ -52,6 +58,7 @@ * @summary Tests related to the javax.xml.transform.Source * and org.xml.sax.InputSource */ +@Listeners({jaxp.library.FilePolicy.class}) public class Sources { /** @@ -108,20 +115,22 @@ * DataProvider: sources that are not empty */ @DataProvider(name = "nonEmptySources") - Object[][] getSourcesEx() throws URISyntaxException { + Object[][] getSourcesEx() { StAXSource ss = null; try { ss = new StAXSource(getXMLEventReader()); - } catch (XMLStreamException ex) {} + } catch (XMLStreamException ex) { + } - return new Object[][]{ - //This will set a non-null systemId on the resulting StreamSource - {new StreamSource(new File(""))}, - //Can't tell because XMLStreamReader is a pull parser, cursor advancement - //would have been required in order to examine the reader. - {new StAXSource(getXMLStreamReader())}, - {ss} - }; + return new Object[][] { + // This will set a non-null systemId on the resulting + // StreamSource + { new StreamSource(new File("")) },// )}, + // Can't tell because XMLStreamReader is a pull parser, cursor + // advancement + // would have been required in order to examine the reader. + { new StAXSource(getXMLStreamReader()) }, + { ss } }; } /*