--- 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 {