author | aefimov |
Fri, 09 Feb 2018 14:49:38 +0000 | |
changeset 48837 | a262b919311a |
permissions | -rw-r--r-- |
48837
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
1 |
/* |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
2 |
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
4 |
* |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
8 |
* |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
13 |
* accompanied this code). |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
14 |
* |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
18 |
* |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
21 |
* questions. |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
22 |
*/ |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
23 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
24 |
/* |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
25 |
* @test |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
26 |
* @bug 6857903 |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
27 |
* @summary The initCause() incorrectly initialize the cause in |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
28 |
* SAXException class when used with SAXException(String) |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
29 |
* constructor. |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
30 |
* @run testng/othervm sax.SAXExceptionInitCause |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
31 |
* @author aleksej.efimov@oracle.com |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
32 |
*/ |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
33 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
34 |
package sax; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
35 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
36 |
import java.io.ByteArrayInputStream; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
37 |
import java.io.ByteArrayOutputStream; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
38 |
import java.io.IOException; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
39 |
import java.io.InvalidClassException; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
40 |
import java.io.ObjectInputStream; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
41 |
import java.io.ObjectOutputStream; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
42 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
43 |
import org.testng.Assert; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
44 |
import org.testng.annotations.Test; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
45 |
import org.xml.sax.SAXException; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
46 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
47 |
public class SAXExceptionInitCause { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
48 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
49 |
@Test |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
50 |
public void testOwnSerializationNoCause() throws Exception { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
51 |
SAXException noCauseException = new SAXException(SAX_MESSAGE); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
52 |
SAXException deserializedException; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
53 |
byte[] serialSAX; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
54 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
55 |
serialSAX = pickleException(noCauseException); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
56 |
deserializedException = unpickleException(serialSAX); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
57 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
58 |
Assert.assertNull(deserializedException.getCause()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
59 |
Assert.assertEquals(deserializedException.getMessage(), SAX_MESSAGE); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
60 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
61 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
62 |
@Test |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
63 |
public void testSerializationWithCause() throws Exception { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
64 |
SAXException withCauseException = new SAXException(SAX_MESSAGE); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
65 |
withCauseException.initCause(new Exception(SAX_CAUSE_MESSAGE)); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
66 |
SAXException deserializedException; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
67 |
byte[] serialSAX; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
68 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
69 |
serialSAX = pickleException(withCauseException); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
70 |
deserializedException = unpickleException(serialSAX); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
71 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
72 |
Assert.assertNotNull(deserializedException.getCause()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
73 |
Assert.assertEquals(deserializedException.getMessage(), SAX_MESSAGE); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
74 |
Assert.assertEquals(deserializedException.getCause().getMessage(), SAX_CAUSE_MESSAGE); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
75 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
76 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
77 |
@Test |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
78 |
public void testCauseInitByCtor() throws Exception { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
79 |
// Check that constructor properly initializes cause |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
80 |
Exception cause = new Exception(SAX_CAUSE_MESSAGE); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
81 |
SAXException exception = new SAXException(cause); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
82 |
Assert.assertSame(exception.getCause(), cause); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
83 |
Assert.assertSame(exception.getException(), cause); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
84 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
85 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
86 |
@Test |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
87 |
public void testCauseInitWithException() { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
88 |
// Check that initCause properly initializes cause |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
89 |
SAXException exception = new SAXException(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
90 |
Exception cause = new Exception(SAX_CAUSE_MESSAGE); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
91 |
exception.initCause(cause); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
92 |
Assert.assertSame(exception.getCause(), cause); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
93 |
Assert.assertSame(exception.getException(), cause); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
94 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
95 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
96 |
@Test |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
97 |
public void testCauseInitWithThrowable() { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
98 |
// Check that if cause is initialized with Throwable instead of Exception |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
99 |
// then getException returns 'null' |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
100 |
SAXException exception = new SAXException(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
101 |
Throwable cause = new Throwable(SAX_CAUSE_MESSAGE); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
102 |
exception.initCause(cause); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
103 |
Assert.assertSame(exception.getCause(),cause); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
104 |
Assert.assertNull(exception.getException()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
105 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
106 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
107 |
@Test(expectedExceptions = IllegalStateException.class) |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
108 |
public void testInitCauseTwice() { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
109 |
SAXException exception = new SAXException(new Exception(SAX_CAUSE_MESSAGE)); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
110 |
// Expecting IllegalStateException at this point |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
111 |
exception.initCause(new Exception(SAX_CAUSE_MESSAGE)); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
112 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
113 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
114 |
@Test |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
115 |
public void testLegacySerialCtor() throws Exception { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
116 |
SAXException saxException8 = unpickleException(JDK8_SET_WITH_CTOR_ONLY); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
117 |
Assert.assertNotNull(saxException8.getCause()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
118 |
Assert.assertNotNull(saxException8.getException()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
119 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
120 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
121 |
@Test |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
122 |
public void testLegacySerialCtorAndInit() throws Exception { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
123 |
SAXException saxException8 = unpickleException(JDK8_SET_WITH_CTOR_AND_INIT); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
124 |
Assert.assertNotNull(saxException8.getCause()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
125 |
Assert.assertNotNull(saxException8.getException()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
126 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
127 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
128 |
@Test |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
129 |
public void testLegacySerialInitCause() throws Exception { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
130 |
SAXException saxException8 = unpickleException(JDK8_WITH_INIT_ONLY); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
131 |
Assert.assertNotNull(saxException8.getCause()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
132 |
Assert.assertNotNull(saxException8.getException()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
133 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
134 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
135 |
@Test |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
136 |
public void testLegacySerialNothingSet() throws Exception { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
137 |
SAXException saxException8 = unpickleException(JDK8_NOTHING_SET); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
138 |
Assert.assertNull(saxException8.getCause()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
139 |
Assert.assertNull(saxException8.getException()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
140 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
141 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
142 |
@Test(expectedExceptions = InvalidClassException.class) |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
143 |
public void testReadObjectIllegalStateException() throws Exception { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
144 |
SAXException saxException8 = unpickleException(JDK8_CHECK_ILLEGAL_STATE_EXCEPTION); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
145 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
146 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
147 |
// Serialize SAXException to byte array |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
148 |
private static byte[] pickleException(SAXException saxException) throws IOException { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
149 |
ByteArrayOutputStream bos = new ByteArrayOutputStream(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
150 |
try (ObjectOutputStream saxExceptionOOS = new ObjectOutputStream(bos)) { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
151 |
saxExceptionOOS.writeObject(saxException); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
152 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
153 |
return bos.toByteArray(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
154 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
155 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
156 |
//Deserialize SAXException with byte array as serial data source |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
157 |
private static SAXException unpickleException(byte[] ser) |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
158 |
throws IOException, ClassNotFoundException { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
159 |
SAXException saxException; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
160 |
ByteArrayInputStream bis = new ByteArrayInputStream(ser); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
161 |
try (ObjectInputStream saxExceptionOIS = new ObjectInputStream(bis)) { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
162 |
saxException = (SAXException) saxExceptionOIS.readObject(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
163 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
164 |
return saxException; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
165 |
} |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
166 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
167 |
private static String SAX_MESSAGE = "SAXException message"; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
168 |
private static String SAX_CAUSE_MESSAGE = "SAXException cause message"; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
169 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
170 |
/* This is a serial form of ordinary SAXException serialized |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
171 |
* by the following JDK8 code: |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
172 |
* ByteArrayOutputStream fser = new ByteArrayOutputStream(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
173 |
* ObjectOutputStream oos = new ObjectOutputStream(fser); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
174 |
* oos.writeObject(new SAXException(new Exception("Only exception field is set."))); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
175 |
* oos.close(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
176 |
*/ |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
177 |
private static final byte[] JDK8_SET_WITH_CTOR_ONLY = { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
178 |
-84, -19, 0, 5, 115, 114, 0, 24, 111, 114, 103, 46, 120, 109, 108, 46, 115, 97, 120, 46, 83, 65, 88, 69, 120, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
179 |
99, 101, 112, 116, 105, 111, 110, 8, 24, 23, 45, 87, -89, -2, 32, 2, 0, 1, 76, 0, 9, 101, 120, 99, 101, 112, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
180 |
116, 105, 111, 110, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 69, 120, 99, 101, 112, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
181 |
105, 111, 110, 59, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 69, 120, 99, 101, 112, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
182 |
105, 111, 110, -48, -3, 31, 62, 26, 59, 28, -60, 2, 0, 0, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
183 |
103, 46, 84, 104, 114, 111, 119, 97, 98, 108, 101, -43, -58, 53, 39, 57, 119, -72, -53, 3, 0, 4, 76, 0, 5, 99, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
184 |
97, 117, 115, 101, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 84, 104, 114, 111, 119, 97, 98, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
185 |
108, 101, 59, 76, 0, 13, 100, 101, 116, 97, 105, 108, 77, 101, 115, 115, 97, 103, 101, 116, 0, 18, 76, 106, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
186 |
118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 91, 0, 10, 115, 116, 97, 99, 107, 84, 114, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
187 |
97, 99, 101, 116, 0, 30, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 97, 99, 107, 84, 114, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
188 |
99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 76, 0, 20, 115, 117, 112, 112, 114, 101, 115, 115, 101, 100, 69, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
189 |
120, 99, 101, 112, 116, 105, 111, 110, 115, 116, 0, 16, 76, 106, 97, 118, 97, 47, 117, 116, 105, 108, 47, 76, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
190 |
105, 115, 116, 59, 120, 112, 113, 0, 126, 0, 8, 112, 117, 114, 0, 30, 91, 76, 106, 97, 118, 97, 46, 108, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
191 |
110, 103, 46, 83, 116, 97, 99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 2, 70, 42, 60, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
192 |
60, -3, 34, 57, 2, 0, 0, 120, 112, 0, 0, 0, 2, 115, 114, 0, 27, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
193 |
83, 116, 97, 99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 97, 9, -59, -102, 38, 54, -35, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
194 |
-123, 2, 0, 4, 73, 0, 10, 108, 105, 110, 101, 78, 117, 109, 98, 101, 114, 76, 0, 14, 100, 101, 99, 108, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
195 |
114, 105, 110, 103, 67, 108, 97, 115, 115, 113, 0, 126, 0, 5, 76, 0, 8, 102, 105, 108, 101, 78, 97, 109, 101, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
196 |
113, 0, 126, 0, 5, 76, 0, 10, 109, 101, 116, 104, 111, 100, 78, 97, 109, 101, 113, 0, 126, 0, 5, 120, 112, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
197 |
0, 0, 26, 116, 0, 8, 71, 101, 110, 101, 114, 97, 116, 101, 116, 0, 13, 71, 101, 110, 101, 114, 97, 116, 101, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
198 |
46, 106, 97, 118, 97, 116, 0, 15, 103, 101, 110, 101, 114, 97, 116, 101, 67, 97, 115, 101, 79, 110, 101, 115, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
199 |
113, 0, 126, 0, 11, 0, 0, 0, 10, 113, 0, 126, 0, 13, 113, 0, 126, 0, 14, 116, 0, 4, 109, 97, 105, 110, 115, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
200 |
114, 0, 38, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 115, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
201 |
36, 85, 110, 109, 111, 100, 105, 102, 105, 97, 98, 108, 101, 76, 105, 115, 116, -4, 15, 37, 49, -75, -20, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
202 |
-114, 16, 2, 0, 1, 76, 0, 4, 108, 105, 115, 116, 113, 0, 126, 0, 7, 120, 114, 0, 44, 106, 97, 118, 97, 46, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
203 |
117, 116, 105, 108, 46, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 36, 85, 110, 109, 111, 100, 105, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
204 |
102, 105, 97, 98, 108, 101, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 25, 66, 0, -128, -53, 94, -9, 30, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
205 |
2, 0, 1, 76, 0, 1, 99, 116, 0, 22, 76, 106, 97, 118, 97, 47, 117, 116, 105, 108, 47, 67, 111, 108, 108, 101, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
206 |
99, 116, 105, 111, 110, 59, 120, 112, 115, 114, 0, 19, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 65, 114, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
207 |
114, 97, 121, 76, 105, 115, 116, 120, -127, -46, 29, -103, -57, 97, -99, 3, 0, 1, 73, 0, 4, 115, 105, 122, 101, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
208 |
120, 112, 0, 0, 0, 0, 119, 4, 0, 0, 0, 0, 120, 113, 0, 126, 0, 23, 120, 115, 113, 0, 126, 0, 2, 113, 0, 126, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
209 |
24, 116, 0, 28, 79, 110, 108, 121, 32, 101, 120, 99, 101, 112, 116, 105, 111, 110, 32, 102, 105, 101, 108, 100, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
210 |
32, 105, 115, 32, 115, 101, 116, 46, 117, 113, 0, 126, 0, 9, 0, 0, 0, 2, 115, 113, 0, 126, 0, 11, 0, 0, 0, 26, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
211 |
113, 0, 126, 0, 13, 113, 0, 126, 0, 14, 113, 0, 126, 0, 15, 115, 113, 0, 126, 0, 11, 0, 0, 0, 10, 113, 0, 126, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
212 |
0, 13, 113, 0, 126, 0, 14, 113, 0, 126, 0, 17, 113, 0, 126, 0, 21, 120 |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
213 |
}; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
214 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
215 |
/* This is a serial form of SAXException with two causes serialized |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
216 |
* by the following JDK8 code: |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
217 |
* ByteArrayOutputStream fser = new ByteArrayOutputStream(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
218 |
* ObjectOutputStream oos = new ObjectOutputStream(fser); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
219 |
* oos.writeObject(new SAXException(new Exception("Exception and cause fields are set")) |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
220 |
* .initCause(new Exception("Cause field"))); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
221 |
* oos.close(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
222 |
*/ |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
223 |
private static final byte[] JDK8_SET_WITH_CTOR_AND_INIT = { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
224 |
-84, -19, 0, 5, 115, 114, 0, 24, 111, 114, 103, 46, 120, 109, 108, 46, 115, 97, 120, 46, 83, 65, 88, 69, 120, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
225 |
99, 101, 112, 116, 105, 111, 110, 8, 24, 23, 45, 87, -89, -2, 32, 2, 0, 1, 76, 0, 9, 101, 120, 99, 101, 112, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
226 |
116, 105, 111, 110, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 69, 120, 99, 101, 112, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
227 |
105, 111, 110, 59, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 69, 120, 99, 101, 112, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
228 |
105, 111, 110, -48, -3, 31, 62, 26, 59, 28, -60, 2, 0, 0, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
229 |
103, 46, 84, 104, 114, 111, 119, 97, 98, 108, 101, -43, -58, 53, 39, 57, 119, -72, -53, 3, 0, 4, 76, 0, 5, 99, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
230 |
97, 117, 115, 101, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 84, 104, 114, 111, 119, 97, 98, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
231 |
108, 101, 59, 76, 0, 13, 100, 101, 116, 97, 105, 108, 77, 101, 115, 115, 97, 103, 101, 116, 0, 18, 76, 106, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
232 |
118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 91, 0, 10, 115, 116, 97, 99, 107, 84, 114, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
233 |
97, 99, 101, 116, 0, 30, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 97, 99, 107, 84, 114, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
234 |
99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 76, 0, 20, 115, 117, 112, 112, 114, 101, 115, 115, 101, 100, 69, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
235 |
120, 99, 101, 112, 116, 105, 111, 110, 115, 116, 0, 16, 76, 106, 97, 118, 97, 47, 117, 116, 105, 108, 47, 76, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
236 |
105, 115, 116, 59, 120, 112, 115, 113, 0, 126, 0, 2, 113, 0, 126, 0, 9, 116, 0, 11, 67, 97, 117, 115, 101, 32, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
237 |
102, 105, 101, 108, 100, 117, 114, 0, 30, 91, 76, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 83, 116, 97, 99, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
238 |
107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 2, 70, 42, 60, 60, -3, 34, 57, 2, 0, 0, 120, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
239 |
112, 0, 0, 0, 2, 115, 114, 0, 27, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 83, 116, 97, 99, 107, 84, 114, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
240 |
97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 97, 9, -59, -102, 38, 54, -35, -123, 2, 0, 4, 73, 0, 10, 108, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
241 |
105, 110, 101, 78, 117, 109, 98, 101, 114, 76, 0, 14, 100, 101, 99, 108, 97, 114, 105, 110, 103, 67, 108, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
242 |
115, 115, 113, 0, 126, 0, 5, 76, 0, 8, 102, 105, 108, 101, 78, 97, 109, 101, 113, 0, 126, 0, 5, 76, 0, 10, 109, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
243 |
101, 116, 104, 111, 100, 78, 97, 109, 101, 113, 0, 126, 0, 5, 120, 112, 0, 0, 0, 34, 116, 0, 8, 71, 101, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
244 |
101, 114, 97, 116, 101, 116, 0, 13, 71, 101, 110, 101, 114, 97, 116, 101, 46, 106, 97, 118, 97, 116, 0, 15, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
245 |
103, 101, 110, 101, 114, 97, 116, 101, 67, 97, 115, 101, 84, 119, 111, 115, 113, 0, 126, 0, 13, 0, 0, 0, 11, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
246 |
113, 0, 126, 0, 15, 113, 0, 126, 0, 16, 116, 0, 4, 109, 97, 105, 110, 115, 114, 0, 38, 106, 97, 118, 97, 46, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
247 |
117, 116, 105, 108, 46, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 36, 85, 110, 109, 111, 100, 105, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
248 |
102, 105, 97, 98, 108, 101, 76, 105, 115, 116, -4, 15, 37, 49, -75, -20, -114, 16, 2, 0, 1, 76, 0, 4, 108, 105, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
249 |
115, 116, 113, 0, 126, 0, 7, 120, 114, 0, 44, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 67, 111, 108, 108, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
250 |
101, 99, 116, 105, 111, 110, 115, 36, 85, 110, 109, 111, 100, 105, 102, 105, 97, 98, 108, 101, 67, 111, 108, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
251 |
108, 101, 99, 116, 105, 111, 110, 25, 66, 0, -128, -53, 94, -9, 30, 2, 0, 1, 76, 0, 1, 99, 116, 0, 22, 76, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
252 |
106, 97, 118, 97, 47, 117, 116, 105, 108, 47, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 59, 120, 112, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
253 |
115, 114, 0, 19, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 65, 114, 114, 97, 121, 76, 105, 115, 116, 120, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
254 |
-127, -46, 29, -103, -57, 97, -99, 3, 0, 1, 73, 0, 4, 115, 105, 122, 101, 120, 112, 0, 0, 0, 0, 119, 4, 0, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
255 |
0, 0, 120, 113, 0, 126, 0, 25, 120, 112, 117, 113, 0, 126, 0, 11, 0, 0, 0, 2, 115, 113, 0, 126, 0, 13, 0, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
256 |
0, 34, 113, 0, 126, 0, 15, 113, 0, 126, 0, 16, 113, 0, 126, 0, 17, 115, 113, 0, 126, 0, 13, 0, 0, 0, 11, 113, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
257 |
0, 126, 0, 15, 113, 0, 126, 0, 16, 113, 0, 126, 0, 19, 113, 0, 126, 0, 23, 120, 115, 113, 0, 126, 0, 2, 113, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
258 |
0, 126, 0, 29, 116, 0, 34, 69, 120, 99, 101, 112, 116, 105, 111, 110, 32, 97, 110, 100, 32, 99, 97, 117, 115, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
259 |
101, 32, 102, 105, 101, 108, 100, 115, 32, 97, 114, 101, 32, 115, 101, 116, 117, 113, 0, 126, 0, 11, 0, 0, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
260 |
2, 115, 113, 0, 126, 0, 13, 0, 0, 0, 34, 113, 0, 126, 0, 15, 113, 0, 126, 0, 16, 113, 0, 126, 0, 17, 115, 113, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
261 |
0, 126, 0, 13, 0, 0, 0, 11, 113, 0, 126, 0, 15, 113, 0, 126, 0, 16, 113, 0, 126, 0, 19, 113, 0, 126, 0, 23, 120 |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
262 |
}; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
263 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
264 |
/* |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
265 |
* ByteArrayOutputStream fser = new ByteArrayOutputStream(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
266 |
* ObjectOutputStream oos = new ObjectOutputStream(fser); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
267 |
* oos.writeObject(new SAXException("SAXException message").initCause(new Exception("cause field"))); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
268 |
* oos.close(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
269 |
*/ |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
270 |
private static final byte[] JDK8_WITH_INIT_ONLY = { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
271 |
-84, -19, 0, 5, 115, 114, 0, 24, 111, 114, 103, 46, 120, 109, 108, 46, 115, 97, 120, 46, 83, 65, 88, 69, 120, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
272 |
99, 101, 112, 116, 105, 111, 110, 8, 24, 23, 45, 87, -89, -2, 32, 2, 0, 1, 76, 0, 9, 101, 120, 99, 101, 112, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
273 |
116, 105, 111, 110, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 69, 120, 99, 101, 112, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
274 |
105, 111, 110, 59, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 69, 120, 99, 101, 112, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
275 |
105, 111, 110, -48, -3, 31, 62, 26, 59, 28, -60, 2, 0, 0, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
276 |
103, 46, 84, 104, 114, 111, 119, 97, 98, 108, 101, -43, -58, 53, 39, 57, 119, -72, -53, 3, 0, 4, 76, 0, 5, 99, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
277 |
97, 117, 115, 101, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 84, 104, 114, 111, 119, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
278 |
98, 108, 101, 59, 76, 0, 13, 100, 101, 116, 97, 105, 108, 77, 101, 115, 115, 97, 103, 101, 116, 0, 18, 76, 106, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
279 |
97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 91, 0, 10, 115, 116, 97, 99, 107, 84, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
280 |
114, 97, 99, 101, 116, 0, 30, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 97, 99, 107, 84, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
281 |
114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 76, 0, 20, 115, 117, 112, 112, 114, 101, 115, 115, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
282 |
101, 100, 69, 120, 99, 101, 112, 116, 105, 111, 110, 115, 116, 0, 16, 76, 106, 97, 118, 97, 47, 117, 116, 105, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
283 |
108, 47, 76, 105, 115, 116, 59, 120, 112, 115, 113, 0, 126, 0, 2, 113, 0, 126, 0, 9, 116, 0, 11, 99, 97, 117, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
284 |
115, 101, 32, 102, 105, 101, 108, 100, 117, 114, 0, 30, 91, 76, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
285 |
83, 116, 97, 99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 2, 70, 42, 60, 60, -3, 34, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
286 |
57, 2, 0, 0, 120, 112, 0, 0, 0, 2, 115, 114, 0, 27, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 83, 116, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
287 |
99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 97, 9, -59, -102, 38, 54, -35, -123, 2, 0, 4, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
288 |
73, 0, 10, 108, 105, 110, 101, 78, 117, 109, 98, 101, 114, 76, 0, 14, 100, 101, 99, 108, 97, 114, 105, 110, 103, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
289 |
67, 108, 97, 115, 115, 113, 0, 126, 0, 5, 76, 0, 8, 102, 105, 108, 101, 78, 97, 109, 101, 113, 0, 126, 0, 5, 76, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
290 |
0, 10, 109, 101, 116, 104, 111, 100, 78, 97, 109, 101, 113, 0, 126, 0, 5, 120, 112, 0, 0, 0, 42, 116, 0, 8, 71, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
291 |
101, 110, 101, 114, 97, 116, 101, 116, 0, 13, 71, 101, 110, 101, 114, 97, 116, 101, 46, 106, 97, 118, 97, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
292 |
0, 17, 103, 101, 110, 101, 114, 97, 116, 101, 67, 97, 115, 101, 84, 104, 114, 101, 101, 115, 113, 0, 126, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
293 |
13, 0, 0, 0, 12, 113, 0, 126, 0, 15, 113, 0, 126, 0, 16, 116, 0, 4, 109, 97, 105, 110, 115, 114, 0, 38, 106, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
294 |
97, 118, 97, 46, 117, 116, 105, 108, 46, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 36, 85, 110, 109, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
295 |
111, 100, 105, 102, 105, 97, 98, 108, 101, 76, 105, 115, 116, -4, 15, 37, 49, -75, -20, -114, 16, 2, 0, 1, 76, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
296 |
0, 4, 108, 105, 115, 116, 113, 0, 126, 0, 7, 120, 114, 0, 44, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 67, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
297 |
111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 36, 85, 110, 109, 111, 100, 105, 102, 105, 97, 98, 108, 101, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
298 |
67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 25, 66, 0, -128, -53, 94, -9, 30, 2, 0, 1, 76, 0, 1, 99, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
299 |
0, 22, 76, 106, 97, 118, 97, 47, 117, 116, 105, 108, 47, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 59, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
300 |
120, 112, 115, 114, 0, 19, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 65, 114, 114, 97, 121, 76, 105, 115, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
301 |
116, 120, -127, -46, 29, -103, -57, 97, -99, 3, 0, 1, 73, 0, 4, 115, 105, 122, 101, 120, 112, 0, 0, 0, 0, 119, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
302 |
4, 0, 0, 0, 0, 120, 113, 0, 126, 0, 25, 120, 116, 0, 20, 83, 65, 88, 69, 120, 99, 101, 112, 116, 105, 111, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
303 |
32, 109, 101, 115, 115, 97, 103, 101, 117, 113, 0, 126, 0, 11, 0, 0, 0, 2, 115, 113, 0, 126, 0, 13, 0, 0, 0, 42, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
304 |
113, 0, 126, 0, 15, 113, 0, 126, 0, 16, 113, 0, 126, 0, 17, 115, 113, 0, 126, 0, 13, 0, 0, 0, 12, 113, 0, 126, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
305 |
15, 113, 0, 126, 0, 16, 113, 0, 126, 0, 19, 113, 0, 126, 0, 23, 120, 112 |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
306 |
}; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
307 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
308 |
/* |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
309 |
* ByteArrayOutputStream fser = new ByteArrayOutputStream(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
310 |
* ObjectOutputStream oos = new ObjectOutputStream(fser); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
311 |
* oos.writeObject(new SAXException("No cause and exception set")); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
312 |
* oos.close(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
313 |
*/ |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
314 |
private static final byte[] JDK8_NOTHING_SET = { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
315 |
-84, -19, 0, 5, 115, 114, 0, 24, 111, 114, 103, 46, 120, 109, 108, 46, 115, 97, 120, 46, 83, 65, 88, 69, 120, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
316 |
99, 101, 112, 116, 105, 111, 110, 8, 24, 23, 45, 87, -89, -2, 32, 2, 0, 1, 76, 0, 9, 101, 120, 99, 101, 112, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
317 |
116, 105, 111, 110, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 69, 120, 99, 101, 112, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
318 |
105, 111, 110, 59, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 69, 120, 99, 101, 112, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
319 |
105, 111, 110, -48, -3, 31, 62, 26, 59, 28, -60, 2, 0, 0, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
320 |
103, 46, 84, 104, 114, 111, 119, 97, 98, 108, 101, -43, -58, 53, 39, 57, 119, -72, -53, 3, 0, 4, 76, 0, 5, 99, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
321 |
97, 117, 115, 101, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 84, 104, 114, 111, 119, 97, 98, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
322 |
108, 101, 59, 76, 0, 13, 100, 101, 116, 97, 105, 108, 77, 101, 115, 115, 97, 103, 101, 116, 0, 18, 76, 106, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
323 |
118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 91, 0, 10, 115, 116, 97, 99, 107, 84, 114, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
324 |
97, 99, 101, 116, 0, 30, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 97, 99, 107, 84, 114, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
325 |
97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 76, 0, 20, 115, 117, 112, 112, 114, 101, 115, 115, 101, 100, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
326 |
69, 120, 99, 101, 112, 116, 105, 111, 110, 115, 116, 0, 16, 76, 106, 97, 118, 97, 47, 117, 116, 105, 108, 47, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
327 |
76, 105, 115, 116, 59, 120, 112, 113, 0, 126, 0, 8, 116, 0, 26, 78, 111, 32, 99, 97, 117, 115, 101, 32, 97, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
328 |
100, 32, 101, 120, 99, 101, 112, 116, 105, 111, 110, 32, 115, 101, 116, 117, 114, 0, 30, 91, 76, 106, 97, 118, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
329 |
97, 46, 108, 97, 110, 103, 46, 83, 116, 97, 99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 59, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
330 |
2, 70, 42, 60, 60, -3, 34, 57, 2, 0, 0, 120, 112, 0, 0, 0, 2, 115, 114, 0, 27, 106, 97, 118, 97, 46, 108, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
331 |
110, 103, 46, 83, 116, 97, 99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 97, 9, -59, -102, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
332 |
38, 54, -35, -123, 2, 0, 4, 73, 0, 10, 108, 105, 110, 101, 78, 117, 109, 98, 101, 114, 76, 0, 14, 100, 101, 99, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
333 |
108, 97, 114, 105, 110, 103, 67, 108, 97, 115, 115, 113, 0, 126, 0, 5, 76, 0, 8, 102, 105, 108, 101, 78, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
334 |
109, 101, 113, 0, 126, 0, 5, 76, 0, 10, 109, 101, 116, 104, 111, 100, 78, 97, 109, 101, 113, 0, 126, 0, 5, 120, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
335 |
112, 0, 0, 0, 50, 116, 0, 8, 71, 101, 110, 101, 114, 97, 116, 101, 116, 0, 13, 71, 101, 110, 101, 114, 97, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
336 |
101, 46, 106, 97, 118, 97, 116, 0, 16, 103, 101, 110, 101, 114, 97, 116, 101, 67, 97, 115, 101, 70, 111, 117, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
337 |
114, 115, 113, 0, 126, 0, 12, 0, 0, 0, 13, 113, 0, 126, 0, 14, 113, 0, 126, 0, 15, 116, 0, 4, 109, 97, 105, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
338 |
115, 114, 0, 38, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
339 |
115, 36, 85, 110, 109, 111, 100, 105, 102, 105, 97, 98, 108, 101, 76, 105, 115, 116, -4, 15, 37, 49, -75, -20, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
340 |
-114, 16, 2, 0, 1, 76, 0, 4, 108, 105, 115, 116, 113, 0, 126, 0, 7, 120, 114, 0, 44, 106, 97, 118, 97, 46, 117, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
341 |
116, 105, 108, 46, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 36, 85, 110, 109, 111, 100, 105, 102, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
342 |
105, 97, 98, 108, 101, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 25, 66, 0, -128, -53, 94, -9, 30, 2, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
343 |
1, 76, 0, 1, 99, 116, 0, 22, 76, 106, 97, 118, 97, 47, 117, 116, 105, 108, 47, 67, 111, 108, 108, 101, 99, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
344 |
105, 111, 110, 59, 120, 112, 115, 114, 0, 19, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 65, 114, 114, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
345 |
121, 76, 105, 115, 116, 120, -127, -46, 29, -103, -57, 97, -99, 3, 0, 1, 73, 0, 4, 115, 105, 122, 101, 120, 112, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
346 |
0, 0, 0, 0, 119, 4, 0, 0, 0, 0, 120, 113, 0, 126, 0, 24, 120, 112 |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
347 |
}; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
348 |
|
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
349 |
/* |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
350 |
* ByteArrayOutputStream fser = new ByteArrayOutputStream(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
351 |
* ObjectOutputStream oos = new ObjectOutputStream(fser); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
352 |
* SAXException se = new SAXException(new Exception()); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
353 |
* se.initCause(null); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
354 |
* oos.writeObject(se); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
355 |
* oos.close(); |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
356 |
*/ |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
357 |
private static final byte[] JDK8_CHECK_ILLEGAL_STATE_EXCEPTION = { |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
358 |
-84, -19, 0, 5, 115, 114, 0, 24, 111, 114, 103, 46, 120, 109, 108, 46, 115, 97, 120, 46, 83, 65, 88, 69, 120, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
359 |
99, 101, 112, 116, 105, 111, 110, 8, 24, 23, 45, 87, -89, -2, 32, 2, 0, 1, 76, 0, 9, 101, 120, 99, 101, 112, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
360 |
116, 105, 111, 110, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 69, 120, 99, 101, 112, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
361 |
105, 111, 110, 59, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 69, 120, 99, 101, 112, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
362 |
105, 111, 110, -48, -3, 31, 62, 26, 59, 28, -60, 2, 0, 0, 120, 114, 0, 19, 106, 97, 118, 97, 46, 108, 97, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
363 |
103, 46, 84, 104, 114, 111, 119, 97, 98, 108, 101, -43, -58, 53, 39, 57, 119, -72, -53, 3, 0, 4, 76, 0, 5, 99, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
364 |
97, 117, 115, 101, 116, 0, 21, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 84, 104, 114, 111, 119, 97, 98, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
365 |
108, 101, 59, 76, 0, 13, 100, 101, 116, 97, 105, 108, 77, 101, 115, 115, 97, 103, 101, 116, 0, 18, 76, 106, 97, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
366 |
118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 114, 105, 110, 103, 59, 91, 0, 10, 115, 116, 97, 99, 107, 84, 114, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
367 |
97, 99, 101, 116, 0, 30, 91, 76, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 116, 97, 99, 107, 84, 114, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
368 |
97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 76, 0, 20, 115, 117, 112, 112, 114, 101, 115, 115, 101, 100, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
369 |
69, 120, 99, 101, 112, 116, 105, 111, 110, 115, 116, 0, 16, 76, 106, 97, 118, 97, 47, 117, 116, 105, 108, 47, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
370 |
76, 105, 115, 116, 59, 120, 112, 112, 112, 117, 114, 0, 30, 91, 76, 106, 97, 118, 97, 46, 108, 97, 110, 103, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
371 |
46, 83, 116, 97, 99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 59, 2, 70, 42, 60, 60, -3, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
372 |
34, 57, 2, 0, 0, 120, 112, 0, 0, 0, 2, 115, 114, 0, 27, 106, 97, 118, 97, 46, 108, 97, 110, 103, 46, 83, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
373 |
97, 99, 107, 84, 114, 97, 99, 101, 69, 108, 101, 109, 101, 110, 116, 97, 9, -59, -102, 38, 54, -35, -123, 2, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
374 |
4, 73, 0, 10, 108, 105, 110, 101, 78, 117, 109, 98, 101, 114, 76, 0, 14, 100, 101, 99, 108, 97, 114, 105, 110, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
375 |
103, 67, 108, 97, 115, 115, 113, 0, 126, 0, 5, 76, 0, 8, 102, 105, 108, 101, 78, 97, 109, 101, 113, 0, 126, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
376 |
5, 76, 0, 10, 109, 101, 116, 104, 111, 100, 78, 97, 109, 101, 113, 0, 126, 0, 5, 120, 112, 0, 0, 0, 60, 116, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
377 |
8, 71, 101, 110, 101, 114, 97, 116, 101, 116, 0, 13, 71, 101, 110, 101, 114, 97, 116, 101, 46, 106, 97, 118, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
378 |
97, 116, 0, 16, 103, 101, 110, 101, 114, 97, 116, 101, 67, 97, 115, 101, 70, 105, 118, 101, 115, 113, 0, 126, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
379 |
0, 11, 0, 0, 0, 14, 113, 0, 126, 0, 13, 113, 0, 126, 0, 14, 116, 0, 4, 109, 97, 105, 110, 115, 114, 0, 38, 106, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
380 |
97, 118, 97, 46, 117, 116, 105, 108, 46, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 36, 85, 110, 109, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
381 |
111, 100, 105, 102, 105, 97, 98, 108, 101, 76, 105, 115, 116, -4, 15, 37, 49, -75, -20, -114, 16, 2, 0, 1, 76, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
382 |
0, 4, 108, 105, 115, 116, 113, 0, 126, 0, 7, 120, 114, 0, 44, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 67, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
383 |
111, 108, 108, 101, 99, 116, 105, 111, 110, 115, 36, 85, 110, 109, 111, 100, 105, 102, 105, 97, 98, 108, 101, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
384 |
67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 25, 66, 0, -128, -53, 94, -9, 30, 2, 0, 1, 76, 0, 1, 99, 116, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
385 |
0, 22, 76, 106, 97, 118, 97, 47, 117, 116, 105, 108, 47, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 59, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
386 |
120, 112, 115, 114, 0, 19, 106, 97, 118, 97, 46, 117, 116, 105, 108, 46, 65, 114, 114, 97, 121, 76, 105, 115, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
387 |
116, 120, -127, -46, 29, -103, -57, 97, -99, 3, 0, 1, 73, 0, 4, 115, 105, 122, 101, 120, 112, 0, 0, 0, 0, 119, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
388 |
4, 0, 0, 0, 0, 120, 113, 0, 126, 0, 23, 120, 115, 113, 0, 126, 0, 2, 113, 0, 126, 0, 24, 112, 117, 113, 0, 126, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
389 |
0, 9, 0, 0, 0, 2, 115, 113, 0, 126, 0, 11, 0, 0, 0, 60, 113, 0, 126, 0, 13, 113, 0, 126, 0, 14, 113, 0, 126, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
390 |
15, 115, 113, 0, 126, 0, 11, 0, 0, 0, 14, 113, 0, 126, 0, 13, 113, 0, 126, 0, 14, 113, 0, 126, 0, 17, 113, 0, |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
391 |
126, 0, 21, 120 |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
392 |
}; |
a262b919311a
6857903: SAXException.initCause() does not correctly set Exception
aefimov
parents:
diff
changeset
|
393 |
} |