< prev index next >
test/javax/xml/jaxp/unittest/sax/IssueTracker56Test.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2014, 2015, 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.
--- 1,7 ----
/*
! * 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,38 ****
--- 29,39 ----
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,49 ****
--- 41,51 ----
/*
* @bug 6809409
* @summary Test SAXException has Cause.
*/
+ @Listeners({jaxp.library.BasePolicy.class})
public class IssueTracker56Test {
@Test
public void testException() {
try {
*** 82,92 ****
// shouldn't happen
}
}
! public class MyHandler extends DefaultHandler implements ErrorHandler {
public void startDocument() throws SAXException {
}
public void endDocument() throws SAXException {
--- 84,95 ----
// shouldn't happen
}
}
! @Listeners({jaxp.library.BasePolicy.class})
! public class MyHandler extends DefaultHandler implements ErrorHandler {
public void startDocument() throws SAXException {
}
public void endDocument() throws SAXException {
*** 108,118 ****
public void characters(char ch[], int start, int length) throws SAXException {
}
}
! public class MyHandler1 extends DefaultHandler implements ErrorHandler {
public void startDocument() throws SAXException {
}
public void endDocument() throws SAXException {
--- 111,122 ----
public void characters(char ch[], int start, int length) throws SAXException {
}
}
! @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 >