39 * @summary Test SchemaFactory can detect particle restriction.
40 */
41 @Listeners({jaxp.library.FilePolicy.class})
42 public class Bug4986844 {
43
44 @Test
45 public void test1() throws Exception {
46 SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
47
48 try {
49 schemaFactory.newSchema(Bug4986844.class.getResource("Bug4986844.xsd"));
50 Assert.fail("should report an error");
51 } catch (SAXException e) {
52 if (e.getMessage().startsWith("rcase-RecurseUnordered.2"))
53 ; // as expected
54 else
55 throw e;
56 }
57 }
58 }
59
|
39 * @summary Test SchemaFactory can detect particle restriction.
40 */
41 @Listeners({jaxp.library.FilePolicy.class})
42 public class Bug4986844 {
43
44 @Test
45 public void test1() throws Exception {
46 SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
47
48 try {
49 schemaFactory.newSchema(Bug4986844.class.getResource("Bug4986844.xsd"));
50 Assert.fail("should report an error");
51 } catch (SAXException e) {
52 if (e.getMessage().startsWith("rcase-RecurseUnordered.2"))
53 ; // as expected
54 else
55 throw e;
56 }
57 }
58 }
|