< prev index next >

test/javax/xml/jaxp/unittest/validation/Bug4971607.java

Print this page




  39  * @summary Test ValidatorHandler.getFeature(...) throws NullPointerException when name parameter is null.
  40  */
  41 @Listeners({jaxp.library.BasePolicy.class})
  42 public class Bug4971607 {
  43 
  44     @Test
  45     public void test1() throws Exception {
  46         SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
  47 
  48         ValidatorHandler validatorHandler = schemaFactory.newSchema().newValidatorHandler();
  49 
  50         try {
  51             validatorHandler.getFeature(null);
  52             Assert.fail();
  53         } catch (NullPointerException e) {
  54             e.printStackTrace();
  55             ; // as expected
  56         }
  57     }
  58 }
  59 


  39  * @summary Test ValidatorHandler.getFeature(...) throws NullPointerException when name parameter is null.
  40  */
  41 @Listeners({jaxp.library.BasePolicy.class})
  42 public class Bug4971607 {
  43 
  44     @Test
  45     public void test1() throws Exception {
  46         SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
  47 
  48         ValidatorHandler validatorHandler = schemaFactory.newSchema().newValidatorHandler();
  49 
  50         try {
  51             validatorHandler.getFeature(null);
  52             Assert.fail();
  53         } catch (NullPointerException e) {
  54             e.printStackTrace();
  55             ; // as expected
  56         }
  57     }
  58 }

< prev index next >