< prev index next >

test/javax/xml/jaxp/unittest/sax/IssueTracker56Test.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -29,10 +29,11 @@
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
 import org.testng.Assert;
+import org.testng.annotations.Listeners;
 import org.testng.annotations.Test;
 import org.xml.sax.Attributes;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;

@@ -40,10 +41,11 @@
 
 /*
  * @bug 6809409
  * @summary Test SAXException has Cause.
  */
+@Listeners({jaxp.library.BasePolicy.class})
 public class IssueTracker56Test {
 
     @Test
     public void testException() {
         try {

@@ -82,11 +84,12 @@
             // shouldn't happen
         }
 
     }
 
-    public class MyHandler extends DefaultHandler implements ErrorHandler {
+    @Listeners({jaxp.library.BasePolicy.class})
+public class MyHandler extends DefaultHandler implements ErrorHandler {
 
         public void startDocument() throws SAXException {
         }
 
         public void endDocument() throws SAXException {

@@ -108,11 +111,12 @@
         public void characters(char ch[], int start, int length) throws SAXException {
         }
 
     }
 
-    public class MyHandler1 extends DefaultHandler implements ErrorHandler {
+    @Listeners({jaxp.library.BasePolicy.class})
+public class MyHandler1 extends DefaultHandler implements ErrorHandler {
 
         public void startDocument() throws SAXException {
         }
 
         public void endDocument() throws SAXException {
< prev index next >