12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4915825 4921009 4934965 4977469 8019584
27 * @summary Tests behavior when client or server gets object of unknown class
28 * @author Eamonn McManus
29 * @run clean MissingClassTest SingleClassLoader
30 * @run build MissingClassTest SingleClassLoader
31 * @run main MissingClassTest
32 */
33
34 /*
35 Tests that clients and servers react correctly when they receive
36 objects of unknown classes. This can happen easily due to version
37 skew or missing jar files on one end or the other. The default
38 behaviour of causing a connection to die because of the resultant
39 IOException is not acceptable! We try sending attributes and invoke
40 parameters to the server of classes it doesn't know, and we try
41 sending attributes, exceptions and notifications to the client of
42 classes it doesn't know.
43
44 We also test objects that are of known class but not serializable.
45 The test cases are similar.
46 */
47
48 import java.io.ByteArrayOutputStream;
49 import java.io.IOException;
50 import java.io.NotSerializableException;
51 import java.io.ObjectOutputStream;
|
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 4915825 4921009 4934965 4977469 8019584
27 * @summary Tests behavior when client or server gets object of unknown class
28 * @author Eamonn McManus
29 * @run clean MissingClassTest SingleClassLoader
30 * @run build MissingClassTest SingleClassLoader
31 * @run main MissingClassTest
32 * @key randomness
33 */
34
35 /*
36 Tests that clients and servers react correctly when they receive
37 objects of unknown classes. This can happen easily due to version
38 skew or missing jar files on one end or the other. The default
39 behaviour of causing a connection to die because of the resultant
40 IOException is not acceptable! We try sending attributes and invoke
41 parameters to the server of classes it doesn't know, and we try
42 sending attributes, exceptions and notifications to the client of
43 classes it doesn't know.
44
45 We also test objects that are of known class but not serializable.
46 The test cases are similar.
47 */
48
49 import java.io.ByteArrayOutputStream;
50 import java.io.IOException;
51 import java.io.NotSerializableException;
52 import java.io.ObjectOutputStream;
|