1
1
/*
2
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -81,6 +81,7 @@ public class CatalogSupport2 extends CatalogSupportBase {
81
81
public void setUpClass () throws Exception {
82
82
setUp ();
83
83
setSystemProperty (SP_USE_CATALOG , "false" );
84
+ setSystemProperty (SP_ACCESS_EXTERNAL_DTD , "file" );
84
85
timeoutRead = getSystemProperty (TTIMEOUTREAD );
85
86
timeoutConnect = getSystemProperty (TIMEOUTCONNECT );
86
87
setSystemProperty (TTIMEOUTREAD , "1000" );
@@ -90,14 +91,15 @@ public void setUpClass() throws Exception {
90
91
@ AfterClass
91
92
public void tearDownClass () throws Exception {
92
93
clearSystemProperty (SP_USE_CATALOG );
94
+ clearSystemProperty (SP_ACCESS_EXTERNAL_DTD );
93
95
setSystemProperty (TIMEOUTCONNECT , "-1" );
94
96
setSystemProperty (TTIMEOUTREAD , "-1" );
95
97
}
96
98
97
99
/*
98
100
Verifies the Catalog support on SAXParser.
99
101
*/
100
- @ Test (dataProvider = "data_SAXC" , expectedExceptions = IOException .class )
102
+ @ Test (dataProvider = "data_SAXC" , expectedExceptions = SAXParseException .class )
101
103
public void testSAXC (boolean setUseCatalog , boolean useCatalog , String catalog , String
102
104
xml , MyHandler handler , String expected ) throws Exception {
103
105
testSAX (setUseCatalog , useCatalog , catalog , xml , handler , expected );
@@ -106,7 +108,7 @@ public void testSAXC(boolean setUseCatalog, boolean useCatalog, String catalog,
106
108
/*
107
109
Verifies the Catalog support on XMLReader.
108
110
*/
109
- @ Test (dataProvider = "data_SAXC" , expectedExceptions = IOException .class )
111
+ @ Test (dataProvider = "data_SAXC" , expectedExceptions = SAXParseException .class )
110
112
public void testXMLReaderC (boolean setUseCatalog , boolean useCatalog , String catalog ,
111
113
String xml , MyHandler handler , String expected ) throws Exception {
112
114
testXMLReader (setUseCatalog , useCatalog , catalog , xml , handler , expected );
@@ -124,7 +126,7 @@ public void testXIncludeC(boolean setUseCatalog, boolean useCatalog, String cata
124
126
/*
125
127
Verifies the Catalog support on DOM parser.
126
128
*/
127
- @ Test (dataProvider = "data_DOMC" , expectedExceptions = IOException .class )
129
+ @ Test (dataProvider = "data_DOMC" , expectedExceptions = SAXParseException .class )
128
130
public void testDOMC (boolean setUseCatalog , boolean useCatalog , String catalog ,
129
131
String xml , MyHandler handler , String expected ) throws Exception {
130
132
testDOM (setUseCatalog , useCatalog , catalog , xml , handler , expected );
@@ -133,7 +135,7 @@ public void testDOMC(boolean setUseCatalog, boolean useCatalog, String catalog,
133
135
/*
134
136
Verifies the Catalog support on XMLStreamReader.
135
137
*/
136
- @ Test (dataProvider = "data_StAXC" )
138
+ @ Test (dataProvider = "data_StAXC" , expectedExceptions = XMLStreamException . class )
137
139
public void testStAXC (boolean setUseCatalog , boolean useCatalog , String catalog ,
138
140
String xml , XMLResolver resolver , String expected ) throws Exception {
139
141
testStAXNegative (setUseCatalog , useCatalog , catalog , xml , resolver , expected );
0 commit comments