< prev index next >
test/javax/xml/jaxp/unittest/catalog/CatalogTest.java
Print this page
*** 22,31 ****
--- 22,32 ----
*/
package catalog;
import java.io.IOException;
import java.nio.file.Paths;
+
import javax.xml.catalog.Catalog;
import javax.xml.catalog.CatalogException;
import javax.xml.catalog.CatalogFeatures;
import javax.xml.catalog.CatalogFeatures.Feature;
import javax.xml.catalog.CatalogManager;
*** 33,45 ****
--- 34,48 ----
import javax.xml.catalog.CatalogUriResolver;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.Source;
+
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
+ 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;
*** 48,57 ****
--- 51,61 ----
/*
* @bug 8081248, 8144966, 8146606, 8146237, 8151154, 8150969, 8151162, 8152527, 8154220
* @summary Tests basic Catalog functions.
*/
+ //@Listeners({jaxp.library.FilePolicy.class}) //uncomment this line after 8161176 is resolved
public class CatalogTest {
static final String KEY_FILES = "javax.xml.catalog.files";
public String filepath;
*** 515,525 ****
}
return saxParser;
}
-
/**
* SAX handler
*/
public class MyHandler extends DefaultHandler2 implements ErrorHandler {
--- 519,528 ----
*** 534,544 ****
String getResult() {
return textContent.toString();
}
@Override
! public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
textContent.delete(0, textContent.length());
try {
System.out.println("Element: " + uri + ":" + localName + " " + qName);
} catch (Exception e) {
throw new SAXException(e);
--- 537,548 ----
String getResult() {
return textContent.toString();
}
@Override
! public void startElement(String uri, String localName, String qName, Attributes attributes)
! throws SAXException {
textContent.delete(0, textContent.length());
try {
System.out.println("Element: " + uri + ":" + localName + " " + qName);
} catch (Exception e) {
throw new SAXException(e);
< prev index next >