--- old/test/javax/xml/jaxp/functional/javax/xml/stream/ptests/XMLEventFactoryNewInstanceTest.java 2016-07-18 00:49:53.644139772 -0700 +++ new/test/javax/xml/jaxp/functional/javax/xml/stream/ptests/XMLEventFactoryNewInstanceTest.java 2016-07-18 00:49:53.513205272 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -28,15 +28,16 @@ import javax.xml.stream.XMLEventFactory; import jaxp.library.JAXPDataProvider; -import jaxp.library.JAXPBaseTest; import org.testng.annotations.DataProvider; +import org.testng.annotations.Listeners; import org.testng.annotations.Test; /* * @summary Tests for XMLEventFactory.newFactory(factoryId , classLoader) */ -public class XMLEventFactoryNewInstanceTest extends JAXPBaseTest { +@Listeners({jaxp.library.BasePolicy.class}) +public class XMLEventFactoryNewInstanceTest { private static final String XMLEVENT_FACTORY_CLASSNAME = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl"; private static final String XMLEVENT_FACRORY_ID = "javax.xml.stream.XMLEventFactory"; @@ -54,12 +55,12 @@ */ @Test(dataProvider = "parameters") public void testNewFactory(String factoryId, ClassLoader classLoader) { - setSystemProperty(XMLEVENT_FACRORY_ID, XMLEVENT_FACTORY_CLASSNAME); + System.setProperty(XMLEVENT_FACRORY_ID, XMLEVENT_FACTORY_CLASSNAME); try { XMLEventFactory xef = XMLEventFactory.newFactory(factoryId, classLoader); assertNotNull(xef); } finally { - setSystemProperty(XMLEVENT_FACRORY_ID, null); + System.clearProperty(XMLEVENT_FACRORY_ID); } }