author | joehw |
Tue, 19 Apr 2016 23:01:06 -0700 | |
changeset 37626 | d4fb6a5dc001 |
child 40223 | 64662417aa2d |
permissions | -rw-r--r-- |
37626
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
1 |
/* |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
2 |
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
4 |
* |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
8 |
* |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
13 |
* accompanied this code). |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
14 |
* |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
18 |
* |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
21 |
* questions. |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
22 |
*/ |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
23 |
|
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
24 |
package stream.XMLEventReaderTest; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
25 |
|
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
26 |
import java.io.StringReader; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
27 |
|
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
28 |
import javax.xml.stream.XMLEventReader; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
29 |
import javax.xml.stream.XMLInputFactory; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
30 |
import javax.xml.stream.XMLStreamException; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
31 |
import javax.xml.stream.events.XMLEvent; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
32 |
|
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
33 |
import org.testng.Assert; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
34 |
import org.testng.annotations.Test; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
35 |
|
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
36 |
import com.sun.org.apache.xerces.internal.impl.XMLEntityManager; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
37 |
|
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
38 |
/* |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
39 |
* @bug 8153781 |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
40 |
* @summary Test if method skipDTD of class XMLDTDScannerImpl will correctly skip the DTD section, |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
41 |
* even if a call to XMLEntityScanner.scanData for skipping to the closing ']' returns true. |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
42 |
*/ |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
43 |
public class Bug8153781 { |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
44 |
public static int DOCTYPE_SECTION_LENGTH = XMLEntityManager.DEFAULT_BUFFER_SIZE * 2; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
45 |
public static int DOCUMENT_LENGTH = DOCTYPE_SECTION_LENGTH + 4096; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
46 |
|
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
47 |
public String createXMLDocument(int doctypeoffset) { |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
48 |
StringBuilder xmlcontentbuilder = new StringBuilder(DOCUMENT_LENGTH); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
49 |
xmlcontentbuilder.append("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n"); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
50 |
xmlcontentbuilder.append("<!DOCTYPE dummy [\r\n"); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
51 |
xmlcontentbuilder.append(" <!ELEMENT dummy EMPTY>\r\n"); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
52 |
xmlcontentbuilder.append(" <!--\r\n"); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
53 |
int doctypelines = DOCTYPE_SECTION_LENGTH / 3; |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
54 |
for (int i = 0; i < doctypeoffset; i++) |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
55 |
xmlcontentbuilder.append('a'); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
56 |
for (int i = 0; i < doctypelines; i++) |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
57 |
xmlcontentbuilder.append("a\r\n"); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
58 |
xmlcontentbuilder.append(" -->\r\n"); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
59 |
xmlcontentbuilder.append(" ]\r\n"); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
60 |
xmlcontentbuilder.append(">\r\n"); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
61 |
xmlcontentbuilder.append("<dummy>\r\n"); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
62 |
xmlcontentbuilder.append("</dummy>\r\n"); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
63 |
System.out.println("Document length:" + xmlcontentbuilder.length()); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
64 |
return xmlcontentbuilder.toString(); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
65 |
} |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
66 |
|
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
67 |
public void runReader(XMLInputFactory factory, int offset) throws XMLStreamException { |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
68 |
StringReader stringReader = new StringReader(createXMLDocument(offset)); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
69 |
XMLEventReader reader = factory.createXMLEventReader(stringReader); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
70 |
|
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
71 |
while (reader.hasNext()) { |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
72 |
XMLEvent event = reader.nextEvent(); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
73 |
System.out.println("Event Type: " + event.getEventType()); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
74 |
} |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
75 |
} |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
76 |
|
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
77 |
@Test |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
78 |
public void test() { |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
79 |
try { |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
80 |
XMLInputFactory factory = XMLInputFactory.newInstance(); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
81 |
factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
82 |
for (int i = 0; i < 3; i++) { |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
83 |
runReader(factory, i); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
84 |
} |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
85 |
} catch (XMLStreamException xe) { |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
86 |
xe.printStackTrace(); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
87 |
Assert.fail(xe.getMessage()); |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
88 |
} |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
89 |
} |
d4fb6a5dc001
8153781: Issue in XMLScanner: EXPECTED_SQUARE_BRACKET_TO_CLOSE_INTERNAL_SUBSET when skipping large DOCTYPE section with CRLF at wrong place
joehw
parents:
diff
changeset
|
90 |
} |