36 * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
37 * @run testng/othervm -DrunSecMngr=true validation.Bug4970383
38 * @run testng/othervm validation.Bug4970383
39 * @summary Test validatorHandler.setFeature throws NullPointerException if name parameter is null.
40 */
41 @Listeners({jaxp.library.BasePolicy.class})
42 public class Bug4970383 {
43
44 @Test
45 public void test() throws Exception {
46 SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
47 ValidatorHandler validatorHandler = schemaFactory.newSchema().newValidatorHandler();
48 try {
49 validatorHandler.setFeature(null, false);
50 Assert.fail("should report an error");
51 } catch (NullPointerException e) {
52 ; // expected
53 }
54 }
55 }
56
|
36 * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
37 * @run testng/othervm -DrunSecMngr=true validation.Bug4970383
38 * @run testng/othervm validation.Bug4970383
39 * @summary Test validatorHandler.setFeature throws NullPointerException if name parameter is null.
40 */
41 @Listeners({jaxp.library.BasePolicy.class})
42 public class Bug4970383 {
43
44 @Test
45 public void test() throws Exception {
46 SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
47 ValidatorHandler validatorHandler = schemaFactory.newSchema().newValidatorHandler();
48 try {
49 validatorHandler.setFeature(null, false);
50 Assert.fail("should report an error");
51 } catch (NullPointerException e) {
52 ; // expected
53 }
54 }
55 }
|