--- old/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java 2016-07-21 20:34:14.188027778 -0700 +++ new/test/javax/xml/jaxp/unittest/sax/Bug7057778Test.java 2016-07-21 20:34:14.073027778 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -38,8 +38,11 @@ import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; -import org.testng.annotations.Test; +import jaxp.library.JAXPTestUtilities; + import org.testng.Assert; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; import org.xml.sax.Attributes; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; @@ -51,6 +54,7 @@ * @bug 7057778 * @summary Test the file can be deleted after SAXParser.parse(File, DefaultHandler). */ +@Listeners({jaxp.library.FilePolicy.class}) public class Bug7057778Test { static final String xml = "Bug7057778.xml"; @@ -59,7 +63,7 @@ @Test public void testParse() { File src = new File(getClass().getResource(xml).getFile()); - File dst = new File(src.getParent() + File.separator + xml1); + File dst = new File(xml1); try { copyFile(src, dst); SAXParserFactory spf = SAXParserFactory.newInstance();