--- old/test/java/io/Serializable/maskSyntheticModifier/Test.java 2017-05-24 21:59:18.244959533 -0700 +++ new/test/java/io/Serializable/maskSyntheticModifier/Test.java 2017-05-24 21:59:17.733894580 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,16 +22,22 @@ */ /* + * @test * @bug 4897937 + * @run main Test * @summary Verify that the presence of the JVM_ACC_SYNTHETIC bit in the * modifiers of fields and methods does not affect default * serialVersionUID calculation. */ import java.io.ObjectStreamClass; +import java.nio.file.*; public class Test { - public static void main(String[] args) { + public static void main(String[] args) throws Exception { + Files.copy(Paths.get(System.getProperty("test.src"), "Foo.class"), + Paths.get("Foo.class"), StandardCopyOption.REPLACE_EXISTING); + long suid = ObjectStreamClass.lookup(Foo.class).getSerialVersionUID(); if (suid != 8027844768744011556L) { throw new Error("incorrect serialVersionUID: " + suid); --- old/test/java/io/Serializable/packageAccess/Test.java 2017-05-24 21:59:18.950049147 -0700 +++ new/test/java/io/Serializable/packageAccess/Test.java 2017-05-24 21:59:18.761025123 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,12 @@ */ /* + * @test * @bug 4765255 + * @library /lib/testlibrary + * @build JarUtils A B C D Driver Test + * @run driver Driver + * @run main Test * @summary Verify proper functioning of package equality checks used to * determine accessibility of superclass constructor and inherited * writeReplace/readResolve methods. @@ -30,6 +35,7 @@ import java.io.*; import java.net.*; +import java.nio.file.*; public class Test { @@ -37,7 +43,7 @@ static Class dcl; public static void main(String[] args) throws Exception { - ClassLoader ldr = + URLClassLoader ldr = new URLClassLoader(new URL[]{ new URL("file:foo.jar") }, Test.class.getClassLoader()); bcl = Class.forName("B", true, ldr); @@ -57,6 +63,7 @@ Object d = dcl.newInstance(); swizzle(d); + ldr.close(); } static void swizzle(Object obj) throws Exception { --- old/test/java/io/Serializable/resolveClass/consTest/Test.java 2017-05-24 21:59:19.465114609 -0700 +++ new/test/java/io/Serializable/resolveClass/consTest/Test.java 2017-05-24 21:59:19.304094144 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,12 +22,18 @@ */ /* + * @test * @bug 4413434 + * @library /lib/testlibrary + * @build JarUtils Driver Boot + * @run driver Driver + * @run main/othervm -Xbootclasspath/a:boot.jar Test * @summary Verify that generated java.lang.reflect implementation classes do * not interfere with serialization's class resolution mechanism. */ import java.io.*; +import java.nio.file.*; import java.lang.reflect.*; public class Test implements Serializable { --- old/test/java/io/Serializable/resolveClass/deserializeButton/Test.java 2017-05-24 21:59:20.095194689 -0700 +++ new/test/java/io/Serializable/resolveClass/deserializeButton/Test.java 2017-05-24 21:59:19.888168377 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,11 @@ */ /* + * @test * @bug 4413434 + * @library /lib/testlibrary + * @build JarUtils Driver Foo + * @run driver Driver * @summary Verify that class loaded outside of application class loader is * correctly resolved during deserialization when read in by custom * readObject() method of a bootstrap class (in this case, @@ -31,12 +35,14 @@ import java.io.*; import java.net.*; +import java.nio.file.*; public class Test { public static void main(String[] args) throws Exception { - ClassLoader ldr = + URLClassLoader ldr = new URLClassLoader(new URL[]{ new URL("file:cb.jar") }); Runnable r = (Runnable) Class.forName("Foo", true, ldr).newInstance(); r.run(); + ldr.close(); } } --- old/test/java/io/Serializable/serialver/classpath/Test.java 2017-05-24 21:59:20.648264981 -0700 +++ new/test/java/io/Serializable/serialver/classpath/Test.java 2017-05-24 21:59:20.456240576 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,14 +22,36 @@ */ /* - * - * @bug 4035147 - * @sumary Simple java class for test purposes + * @test + * @bug 4035147 4785472 + * @library /test/lib + * @build jdk.test.lib.JDKToolLauncher jdk.test.lib.process.ProcessTools Test + * @run main serialver.Test + * @summary Test the use of the -classpath switch in the serialver application. */ package serialver; +import java.io.File; + +import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.process.ProcessTools; + public class Test implements java.io.Serializable{ int a; int b; + + public static void main(String args[]) throws Exception { + JDKToolLauncher serialver = + JDKToolLauncher.create("serialver") + .addToolArg("-classpath") + .addToolArg(System.getProperty("test.class.path")) + .addToolArg("serialver.Test"); + Process p = ProcessTools.startProcess("serialver", + new ProcessBuilder(serialver.getCommand())); + p.waitFor(); + if (p.exitValue() != 0) { + throw new RuntimeException("error occurs in serialver."); + } + } } --- old/test/java/io/Serializable/serialver/nested/Test.java 2017-05-24 21:59:21.208336163 -0700 +++ new/test/java/io/Serializable/serialver/nested/Test.java 2017-05-24 21:59:21.015311631 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,19 +22,40 @@ */ /* - * - * @bug 4312217 + * @test + * @bug 4312217 4785473 + * @library /test/lib + * @build jdk.test.lib.JDKToolLauncher jdk.test.lib.process.ProcessTools Test + * @run main serialver.Test * @summary To test the use of nested class specification using the '.' * notation instead of the '$' notation. */ + package serialver; import java.io.*; +import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.process.ProcessTools; + public class Test implements Serializable { public static class Test1 implements Serializable { public static class Test2 implements Serializable{ private static final long serialVersionUID = 100L; } } + + public static void main(String args[]) throws Exception { + JDKToolLauncher serialver = + JDKToolLauncher.create("serialver") + .addToolArg("-classpath") + .addToolArg(System.getProperty("test.class.path")) + .addToolArg("serialver.Test.Test1.Test2"); + Process p = ProcessTools.startProcess("serialver", + new ProcessBuilder(serialver.getCommand())); + p.waitFor(); + if (p.exitValue() != 0) { + throw new RuntimeException("error occurs in serialver."); + } + } } --- old/test/java/io/Serializable/subclass/Allow.policy 2017-05-24 21:59:21.774408108 -0700 +++ new/test/java/io/Serializable/subclass/Allow.policy 2017-05-24 21:59:21.567381796 -0700 @@ -2,7 +2,6 @@ // "standard" properies that can be read by anyone permission java.io.FilePermission "-","read,write,execute"; permission java.io.SerializablePermission "enableSubstitution"; - permission java.io.SerializablePermission "enableSubclassImplementation"; // Needed to get access to private writeObjectMethod and // to be able to call it. --- old/test/java/io/Serializable/subclass/Test.java 2017-05-24 21:59:22.316477002 -0700 +++ new/test/java/io/Serializable/subclass/Test.java 2017-05-24 21:59:22.145455266 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,20 +26,21 @@ * @bug 4100915 * @summary Verify that [write/read]ObjectOverride methods get called. * Test verifies that ALL methods to write an object can - * be overridden. Howver, the testing for reading an object + * be overridden. However, the testing for reading an object * is incomplete. Only test that readObjectOverride is called. * An entire protocol would need to be implemented and written * out before being able to test the input side of the API. * * Also, would be appropriate that this program verify - * that if SerializablePermission "enableSubclassImplamentation" + * that if SerializablePermission "enableSubclassImplementation" * is not in the security policy and security is enabled, that * a security excepiton is thrown when constructing the * ObjectOutputStream subclass. * * * @compile AbstractObjectInputStream.java AbstractObjectOutputStream.java XObjectInputStream.java XObjectOutputStream.java Test.java - * @run main Test + * @run main Test + * @run main/othervm/policy=Allow.policy Test -expectSecurityException */ import java.io.*; @@ -129,10 +130,11 @@ throw new Error("Assertion failure. " + "Expected a security exception on previous line."); } catch (SecurityException e) { - if (expectSecurityException) + if (expectSecurityException) { + System.err.println("Caught expected security exception."); return; - else - throw e; + } + throw e; } os.writeObject(new A()); os.close(); --- old/test/java/io/Serializable/superclassDataLoss/Test.java 2017-05-24 21:59:22.885549328 -0700 +++ new/test/java/io/Serializable/superclassDataLoss/Test.java 2017-05-24 21:59:22.675522635 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,12 @@ */ /* + * @test * @bug 4325590 + * @library /lib/testlibrary + * @build JarUtils Driver A B + * @run driver Driver + * @run main Test * @summary Verify that superclass data is not lost when incoming superclass * descriptor is matched with local class that is not a superclass of * the deserialized instance's class. @@ -30,22 +35,35 @@ import java.io.*; import java.net.*; +import java.nio.file.*; class MixedSuperclassStream extends ObjectInputStream { - MixedSuperclassStream(InputStream in) throws IOException { super(in); } + private boolean ldr12A; + + MixedSuperclassStream(InputStream in, boolean ldr1First) throws IOException { + super(in); + this.ldr12A = ldr12A; + } protected Class resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException { // resolve A's classdesc to class != B's superclass String name = desc.getName(); - if (name.equals("A")) { - return Class.forName(name, true, Test.ldr1); - } else if (name.equals("B")) { - return Class.forName(name, true, Test.ldr2); + if (ldr12A) { + if (name.equals("A")) { + return Class.forName(name, true, Test.ldr1); + } else if (name.equals("B")) { + return Class.forName(name, true, Test.ldr2); + } } else { - return super.resolveClass(desc); + if (name.equals("B")) { + return Class.forName(name, true, Test.ldr1); + } else if (name.equals("A")) { + return Class.forName(name, true, Test.ldr2); + } } + return super.resolveClass(desc); } } @@ -70,10 +88,18 @@ oout.writeObject(a); oout.close(); + test(bout, true); + test(bout, false); + + ldr1.close(); + ldr2.close(); + } + + private static void test(ByteArrayOutputStream bout, boolean ldr12A) throws Exception { ByteArrayInputStream bin = new ByteArrayInputStream(bout.toByteArray()); - ObjectInputStream oin = new MixedSuperclassStream(bin); - a = (Runnable) oin.readObject(); + ObjectInputStream oin = new MixedSuperclassStream(bin, ldr12A); + Runnable a = (Runnable) oin.readObject(); a.run(); } } --- old/test/java/io/Serializable/unnamedPackageSwitch/Test.java 2017-05-24 21:59:23.454621655 -0700 +++ new/test/java/io/Serializable/unnamedPackageSwitch/Test.java 2017-05-24 21:59:23.310603351 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,7 +22,10 @@ */ /* + * @test * @bug 4348213 + * @build Test pkg.A + * @run main Test * @summary Verify that deserialization allows an incoming class descriptor * representing a class in the unnamed package to be resolved to a * local class with the same name in a named package, and vice-versa. --- /dev/null 2017-05-24 02:25:42.601283820 -0700 +++ new/test/java/io/Serializable/evolution/RenamePackage/Test.java 2017-05-24 21:59:23.790664364 -0700 @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4087295 4785472 + * @library /test/lib + * @build jdk.test.lib.compiler.CompilerUtils jdk.test.lib.process.ProcessTools Test + * @run main Test + * @summary Enable resolveClass() to accommodate package renaming. + * This fix enables one to implement a resolveClass method that maps a + * Serialiazable class within a serialization stream to the same class + * in a different package within the JVM runtime. See run shell script + * for instructions on how to run this test. + */ + +import java.io.File; +import java.nio.file.*; + +import jdk.test.lib.compiler.CompilerUtils; +import jdk.test.lib.process.ProcessTools; + +public class Test { + public static void main(String args[]) throws Exception { + prepare(); + + runTestSerialDriver(); + runInstallSerialDriver(); + + runInstallSerialDriver(); + runTestSerialDriver(); + } + + private static final Path SHARE = Paths.get(System.getProperty("test.classes"), "share"); + private static final Path OCLASSES = Paths.get(System.getProperty("test.classes"), "oclasses"); + private static final Path NCLASSES = Paths.get(System.getProperty("test.classes"), "nclasses"); + + private static void prepare() throws Exception { + + boolean b = CompilerUtils.compile(Paths.get(System.getProperty("test.src"), "extension"), + SHARE); + assertTrue(b); + b = CompilerUtils.compile(Paths.get(System.getProperty("test.src"), "test"), + OCLASSES, + "-classpath", + SHARE.toString()); + assertTrue(b); + b = CompilerUtils.compile(Paths.get(System.getProperty("test.src"), "install"), + NCLASSES, + "-classpath", + SHARE.toString()); + assertTrue(b); + } + + private static void runTestSerialDriver() throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, + "-classpath", + SHARE.toString() + + File.pathSeparator + + OCLASSES.toString(), + "test.SerialDriver", "-s"); + Process p = ProcessTools.startProcess("test SerialDriver", pb); + p.waitFor(); + assertTrue(p.exitValue() == 0); + } + + private static void runInstallSerialDriver() throws Exception { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, + "-classpath", + SHARE.toString() + + File.pathSeparator + + NCLASSES.toString(), + "install.SerialDriver", "-d"); + Process p = ProcessTools.startProcess("install SerialDriver", pb); + p.waitFor(); + assertTrue(p.exitValue() == 0); + } + + private static void assertTrue(boolean b) { + if (!b) { + throw new RuntimeException("expected true, get false"); + } + } +} --- /dev/null 2017-05-24 02:25:42.601283820 -0700 +++ new/test/java/io/Serializable/packageAccess/Driver.java 2017-05-24 21:59:24.469750672 -0700 @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.nio.file.*; + +public class Driver { + + public static void main(String args[]) throws Exception { + Path classes = Paths.get(System.getProperty("test.classes", "")); + JarUtils.createJarFile(Paths.get("foo.jar"), classes, + classes.resolve("B.class"), classes.resolve("D.class")); + Files.delete(classes.resolve("B.class")); + Files.delete(classes.resolve("D.class")); + } +} --- /dev/null 2017-05-24 02:25:42.601283820 -0700 +++ new/test/java/io/Serializable/resolveClass/consTest/Driver.java 2017-05-24 21:59:25.160838506 -0700 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.nio.file.*; + +public class Driver { + + public static void main(String args[]) throws Exception { + Path classes = Paths.get(System.getProperty("test.classes", "")); + JarUtils.createJarFile(Paths.get("boot.jar"), classes, + classes.resolve("Boot.class")); + } +} --- /dev/null 2017-05-24 02:25:42.601283820 -0700 +++ new/test/java/io/Serializable/resolveClass/deserializeButton/Driver.java 2017-05-24 21:59:25.814921637 -0700 @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.nio.file.*; + +public class Driver { + + public static void main(String args[]) throws Exception { + Path classes = Paths.get(System.getProperty("test.classes", "")); + JarUtils.createJarFile(Paths.get("cb.jar"), classes, + classes.resolve("Foo.class"), classes.resolve("Foo$TestElement.class")); + } +} --- /dev/null 2017-05-24 02:25:42.601283820 -0700 +++ new/test/java/io/Serializable/superclassDataLoss/Driver.java 2017-05-24 21:59:26.512010233 -0700 @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +import java.nio.file.*; + +public class Driver { + + public static void main(String args[]) throws Exception { + Path classes = Paths.get(System.getProperty("test.classes", "")); + JarUtils.createJarFile(Paths.get("cb1.jar"), classes, + classes.resolve("A.class"), classes.resolve("B.class")); + Files.copy(Paths.get("cb1.jar"), Paths.get("cb2.jar"), + StandardCopyOption.REPLACE_EXISTING); + } +} --- old/test/java/io/Serializable/evolution/AddedExternField/run.sh 2017-05-24 21:59:27.416125141 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,33 +0,0 @@ -# -# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# -# @bug 4088176 -# @summary Test reading an evolved class serialization into the original class - -rm *.class tmp.ser -javac WriteAddedField.java -java ${TESTVMOPTS} WriteAddedField -rm *.class -javac ReadAddedField.java -java ${TESTVMOPTS} ReadAddedField --- old/test/java/io/Serializable/evolution/RenamePackage/run.sh 2017-05-24 21:59:27.836178528 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,105 +0,0 @@ -# -# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 4087295 4785472 -# @summary Enable resolveClass() to accommodate package renaming. -# This fix enables one to implement a resolveClass method that maps a -# Serialiazable class within a serialization stream to the same class -# in a different package within the JVM runtime. See run shell script -# for instructions on how to run this test. - - -if [ "${TESTJAVA}" = "" ] -then - echo "TESTJAVA not set. Test cannot execute. Failed." - exit 1 -fi - -if [ "${COMPILEJAVA}" = "" ] ; then - COMPILEJAVA="${TESTJAVA}" -fi - - -OS=`uname -s` -# Need to determine the classpath separator and filepath separator based on the -# operating system. -case "$OS" in -SunOS | Linux | Darwin | AIX ) - PS=":" ;; -Windows* | CYGWIN* ) - PS=";" ;; -* ) - echo "Unrecognized system!" - exit 1 ;; -esac - -JAVA=${TESTJAVA}/bin/java -JAVAC=${COMPILEJAVA}/bin/javac -MKDIR=mkdir -RDEL="rm -r" - -if [ -d ${TESTCLASSES}/oclasses ] -then - ${RDEL} ${TESTCLASSES}/oclasses -fi -if [ -d ${TESTCLASSES}/nclasses ] -then - ${RDEL} ${TESTCLASSES}/nclasses -fi -if [ -d ${TESTCLASSES}/share ] -then - ${RDEL} ${TESTCLASSES}/share -fi -if [ -f ${TESTCLASSES}/stream.ser ] -then - ${RDEL} ${TESTCLASSES}/stream.ser -fi - -mkdir ${TESTCLASSES}/oclasses -mkdir ${TESTCLASSES}/share -mkdir ${TESTCLASSES}/nclasses - -# Build sources -set -e -${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}/share \ - ${TESTSRC}/extension/ExtendedObjectInputStream.java -CLASSPATH=${TESTCLASSES}/share; export CLASSPATH; -${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}/oclasses \ - ${TESTSRC}/test/SerialDriver.java -CLASSPATH=${TESTCLASSES}/share; export CLASSPATH; -${JAVAC} ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}/nclasses \ - ${TESTSRC}/install/SerialDriver.java - -# Run Case 1. Map test.SerialDriver within stream to install.SerialDriver. -CLASSPATH="${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share"; export CLASSPATH; -${JAVA} ${TESTVMOPTS} test.SerialDriver -s -CLASSPATH="${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share"; export CLASSPATH; -${JAVA} ${TESTVMOPTS} install.SerialDriver -d -rm stream.ser - -# Run Case 2. Map install.SerialDriver within stream to test.SerialDriver. -CLASSPATH="${TESTCLASSES}/nclasses${PS}${TESTCLASSES}/share"; export CLASSPATH; -${JAVA} ${TESTVMOPTS} install.SerialDriver -s -CLASSPATH="${TESTCLASSES}/oclasses${PS}${TESTCLASSES}/share"; export CLASSPATH; -${JAVA} ${TESTVMOPTS} test.SerialDriver -d --- old/test/java/io/Serializable/maskSyntheticModifier/run.sh 2017-05-24 21:59:28.178222000 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,49 +0,0 @@ -# -# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 4897937 -# @summary Verify that the presence of the JVM_ACC_SYNTHETIC bit in the -# modifiers of fields and methods does not affect default -# serialVersionUID calculation. - -if [ "${TESTJAVA}" = "" ] -then - echo "TESTJAVA not set. Test cannot execute. Failed." -exit 1 -fi - -if [ "${COMPILEJAVA}" = "" ] ; then - COMPILEJAVA="${TESTJAVA}" -fi - -if [ "${TESTSRC}" = "" ] -then - TESTSRC="." -fi - -set -ex -cp ${TESTSRC}/Foo.class . -${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}/Test.java -${TESTJAVA}/bin/java ${TESTVMOPTS} Test -rm -f *.class --- old/test/java/io/Serializable/packageAccess/run.sh 2017-05-24 21:59:28.535267379 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,54 +0,0 @@ -# -# Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 4765255 -# @summary Verify proper functioning of package equality checks used to -# determine accessibility of superclass constructor and inherited -# writeReplace/readResolve methods. - -if [ "${TESTJAVA}" = "" ] -then - echo "TESTJAVA not set. Test cannot execute. Failed." -exit 1 -fi - -if [ "${COMPILEJAVA}" = "" ] ; then - COMPILEJAVA="${TESTJAVA}" -fi - -if [ "${TESTSRC}" = "" ] -then - TESTSRC="." -fi - -set -ex - -${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \ - ${TESTSRC}/A.java ${TESTSRC}/B.java ${TESTSRC}/C.java ${TESTSRC}/D.java \ - ${TESTSRC}/Test.java -${COMPILEJAVA}/bin/jar ${TESTTOOLVMOPTS} cf foo.jar B.class D.class -rm -f B.class D.class - -${TESTJAVA}/bin/java ${TESTVMOPTS} Test -rm -f *.class *.jar --- old/test/java/io/Serializable/resolveClass/consTest/run.sh 2017-05-24 21:59:28.947319748 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,53 +0,0 @@ -# -# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 4413434 -# @summary Verify that generated java.lang.reflect implementation classes do -# not interfere with serialization's class resolution mechanism. - -if [ "${TESTJAVA}" = "" ] -then - echo "TESTJAVA not set. Test cannot execute. Failed." -exit 1 -fi - -if [ "${COMPILEJAVA}" = "" ] ; then - COMPILEJAVA="${TESTJAVA}" -fi - -if [ "${TESTSRC}" = "" ] -then - TESTSRC="." -fi - -set -ex - -rm -f *.class *.jar -${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}/Boot.java -${COMPILEJAVA}/bin/jar ${TESTTOOLVMOPTS} cf boot.jar *.class -rm -f *.class -${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -classpath boot.jar -d . \ - ${TESTSRC}/Test.java -${TESTJAVA}/bin/java ${TESTVMOPTS} -Xbootclasspath/a:boot.jar Test -rm -f *.class *.jar --- old/test/java/io/Serializable/resolveClass/deserializeButton/run.sh 2017-05-24 21:59:29.279361949 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,54 +0,0 @@ -# -# Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 4413434 -# @summary Verify that class loaded outside of application class loader is -# correctly resolved during deserialization when read in by custom -# readObject() method of a bootstrap class (in this case, -# java.util.Vector). - -if [ "${TESTJAVA}" = "" ] -then - echo "TESTJAVA not set. Test cannot execute. Failed." -exit 1 -fi - -if [ "${COMPILEJAVA}" = "" ] ; then - COMPILEJAVA="${TESTJAVA}" -fi - -if [ "${TESTSRC}" = "" ] -then - TESTSRC="." -fi - -set -ex - -rm -f *.class *.jar -${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}/Foo.java -${COMPILEJAVA}/bin/jar ${TESTTOOLVMOPTS} cf cb.jar *.class -rm -f *.class -${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}/Test.java -${TESTJAVA}/bin/java ${TESTVMOPTS} Test -rm -f *.class *.jar --- old/test/java/io/Serializable/serialver/classpath/run.sh 2017-05-24 21:59:29.598402498 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,64 +0,0 @@ -# -# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 4035147 4785472 -# @summary Test the use of the -classpath switch in the serialver application. -# @author Naveen Sanjeeva -# -# @build Test -# @run shell run.sh - -# set a few environment variables so that the shell-script can run stand-alone -# in the source directory - -if [ "${TESTSRC}" = "" ] ; then - TESTSRC="." -fi -if [ "${TESTCLASSES}" = "" ] ; then - TESTCLASSES="." -fi -if [ "${TESTJAVA}" = "" ] ; then - echo "TESTJAVA not set. Test cannot execute." - echo "FAILED!!!" - exit 1 -fi - -# set platform-dependent variables -OS=`uname -s` -case "$OS" in - SunOS | Linux | Darwin | AIX ) - PS=":" ;; - Windows* | CYGWIN* ) - PS=";" ;; - * ) - echo "Unrecognized system!" - exit 1 ;; -esac - -# the test code - -echo "Using the classpath .${PS}${TESTCLASSES}" -${TESTJAVA}/bin/serialver -classpath ".${PS}${TESTCLASSES}" serialver.Test - -exit $? --- old/test/java/io/Serializable/serialver/nested/run.sh 2017-05-24 21:59:29.921443554 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,64 +0,0 @@ -# -# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 4312217 4785473 -# @summary Test the use of the -classpath switch in the serialver application. -# @author Naveen Sanjeeva -# -# @build Test -# @run shell run.sh - -# set a few environment variables so that the shell-script can run stand-alone -# in the source directory - -if [ "${TESTSRC}" = "" ] ; then - TESTSRC="." -fi -if [ "${TESTCLASSES}" = "" ] ; then - TESTCLASSES="." -fi -if [ "${TESTJAVA}" = "" ] ; then - echo "TESTJAVA not set. Test cannot execute." - echo "FAILED!!!" - exit 1 -fi - -# set platform-dependent variables -OS=`uname -s` -case "$OS" in - SunOS | Linux | Darwin | AIX ) - PS=":" ;; - Windows* | CYGWIN* ) - PS=";" ;; - * ) - echo "Unrecognized system!" - exit 1 ;; -esac - -# the test code - -echo "Using the classpath .${PS}${TESTCLASSES}" -${TESTJAVA}/bin/serialver -classpath ".${PS}${TESTCLASSES}" 'serialver.Test.Test1.Test2' - -exit $? --- old/test/java/io/Serializable/subclass/run.sh 2017-05-24 21:59:30.295491094 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,30 +0,0 @@ -# -# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# -# @bug 4100915 -mkdir classes -javac -d classes *.java -java ${TESTVMOPTS} -classpath classes -Djava.policy=Allow.policy Test -# ENABLE next line when new method for invoking a main with a SecureClassLoader is known -#java -classpath classes -Djava.policy=NotAllow.policy Test -expectSecurityException --- old/test/java/io/Serializable/superclassDataLoss/run.sh 2017-05-24 21:59:30.657537108 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,56 +0,0 @@ -# -# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 4325590 -# @summary Verify that superclass data is not lost when incoming superclass -# descriptor is matched with local class that is not a superclass of -# the deserialized instance's class. - -if [ "${TESTJAVA}" = "" ] -then - echo "TESTJAVA not set. Test cannot execute. Failed." -exit 1 -fi - -if [ "${COMPILEJAVA}" = "" ] ; then - COMPILEJAVA="${TESTJAVA}" -fi - -if [ "${TESTSRC}" = "" ] -then - TESTSRC="." -fi - -set -ex - -${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \ - ${TESTSRC}/A.java ${TESTSRC}/B.java -${COMPILEJAVA}/bin/jar ${TESTTOOLVMOPTS} cf cb1.jar A.class B.class -cp cb1.jar cb2.jar -rm -f A.class B.class - -${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \ - ${TESTSRC}/Test.java -${TESTJAVA}/bin/java ${TESTVMOPTS} Test -rm -f *.class *.jar --- old/test/java/io/Serializable/unnamedPackageSwitch/run.sh 2017-05-24 21:59:31.035585156 -0700 +++ /dev/null 2017-05-24 02:25:42.601283820 -0700 @@ -1,49 +0,0 @@ -# -# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -# or visit www.oracle.com if you need additional information or have any -# questions. -# - -# @test -# @bug 4348213 -# @summary Verify that deserialization allows an incoming class descriptor -# representing a class in the unnamed package to be resolved to a -# local class with the same name in a named package, and vice-versa. - -if [ "${TESTJAVA}" = "" ] -then - echo "TESTJAVA not set. Test cannot execute. Failed." -exit 1 -fi - -if [ "${COMPILEJAVA}" = "" ] ; then - COMPILEJAVA="${TESTJAVA}" -fi - -if [ "${TESTSRC}" = "" ] -then - TESTSRC="." -fi - -set -ex - -${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \ - ${TESTSRC}/A.java ${TESTSRC}/Test.java -${TESTJAVA}/bin/java ${TESTVMOPTS} Test