< prev index next >

test/javax/xml/jaxp/unittest/xpath/Bug4991939.java

Print this page




  44 public class Bug4991939 {
  45 
  46     @Test
  47     public void testXPath13() throws Exception {
  48         QName qname = new QName(XMLConstants.XML_NS_URI, "");
  49 
  50         XPathFactory xpathFactory = XPathFactory.newInstance();
  51         Assert.assertNotNull(xpathFactory);
  52 
  53         XPath xpath = xpathFactory.newXPath();
  54         Assert.assertNotNull(xpath);
  55 
  56         try {
  57             xpath.evaluate("1+1", (Object) null, qname);
  58             Assert.fail("failed , expected IAE not thrown");
  59         } catch (IllegalArgumentException e) {
  60             ; // as expected
  61         }
  62     }
  63 }
  64 


  44 public class Bug4991939 {
  45 
  46     @Test
  47     public void testXPath13() throws Exception {
  48         QName qname = new QName(XMLConstants.XML_NS_URI, "");
  49 
  50         XPathFactory xpathFactory = XPathFactory.newInstance();
  51         Assert.assertNotNull(xpathFactory);
  52 
  53         XPath xpath = xpathFactory.newXPath();
  54         Assert.assertNotNull(xpath);
  55 
  56         try {
  57             xpath.evaluate("1+1", (Object) null, qname);
  58             Assert.fail("failed , expected IAE not thrown");
  59         } catch (IllegalArgumentException e) {
  60             ; // as expected
  61         }
  62     }
  63 }

< prev index next >