Bug4988268.java revision 997:540334ae53fe
1238106Sdes/* 2238106Sdes * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. 3238106Sdes * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4238106Sdes * 5238106Sdes * This code is free software; you can redistribute it and/or modify it 6238106Sdes * under the terms of the GNU General Public License version 2 only, as 7238106Sdes * published by the Free Software Foundation. 8238106Sdes * 9238106Sdes * This code is distributed in the hope that it will be useful, but WITHOUT 10238106Sdes * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11238106Sdes * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12238106Sdes * version 2 for more details (a copy is included in the LICENSE file that 13238106Sdes * accompanied this code). 14238106Sdes * 15238106Sdes * You should have received a copy of the GNU General Public License version 16238106Sdes * 2 along with this work; if not, write to the Free Software Foundation, 17238106Sdes * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18238106Sdes * 19238106Sdes * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20238106Sdes * or visit www.oracle.com if you need additional information or have any 21238106Sdes * questions. 22238106Sdes */ 23238106Sdes 24269257Sdespackage validation; 25269257Sdes 26269257Sdesimport javax.xml.validation.SchemaFactory; 27269257Sdes 28269257Sdesimport org.testng.annotations.Listeners; 29269257Sdesimport org.testng.annotations.Test; 30269257Sdes 31269257Sdes/* 32269257Sdes * @test 33269257Sdes * @bug 4988268 34238106Sdes * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest 35238106Sdes * @run testng/othervm -DrunSecMngr=true validation.Bug4988268 36238106Sdes * @run testng/othervm validation.Bug4988268 37238106Sdes * @summary Test the schema is valid. 38238106Sdes */ 39238106Sdes@Listeners({jaxp.library.FilePolicy.class}) 40238106Sdespublic class Bug4988268 { 41238106Sdes 42238106Sdes @Test 43238106Sdes public void test1() throws Exception { 44238106Sdes SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); 45238106Sdes 46238106Sdes schemaFactory.newSchema(Bug4988268.class.getResource("Bug4988268.xsd")); 47238106Sdes } 48238106Sdes} 49238106Sdes