# HG changeset patch # User alanb # Date 1463659716 -3600 # Node ID abb80b35c9ddbf85fd2499f97dfc358fb973a44f # Parent 5d6ff7d76bf47dfc28dc4ef2cab2c6d5377d49c3 8157290: jdk/modules/scenarios/overlappingpackages/OverlappingPackagesTest.java failing Reviewed-by: chegar diff -r 5d6ff7d76bf4 -r abb80b35c9dd jdk/test/jdk/modules/scenarios/overlappingpackages/OverlappingPackagesTest.java --- a/jdk/test/jdk/modules/scenarios/overlappingpackages/OverlappingPackagesTest.java Thu May 19 04:20:08 2016 -0700 +++ b/jdk/test/jdk/modules/scenarios/overlappingpackages/OverlappingPackagesTest.java Thu May 19 13:08:36 2016 +0100 @@ -66,13 +66,7 @@ } Path srcMisc = SRC_DIR.resolve("misc"); Path modsMisc = MODS_DIR.resolve("misc"); - assertTrue(CompilerUtils.compile(srcMisc.resolve("sun") - .resolve("misc") - .resolve("Unsafe.java"), - modsMisc, - "-Xmodule:java.base")); - assertTrue(CompilerUtils.compile(srcMisc.resolve("module-info.java"), - modsMisc)); + assertTrue(CompilerUtils.compile(srcMisc, modsMisc)); } /** @@ -92,7 +86,7 @@ /** * Run the test with "-addmods misc", the misc module has package - * sun.misc and so should overlap with the base module. + * jdk.internal.misc and so should overlap with the base module. */ public void testOverlapWithBaseModule() throws Exception { int exitValue diff -r 5d6ff7d76bf4 -r abb80b35c9dd jdk/test/jdk/modules/scenarios/overlappingpackages/src/misc/jdk/internal/misc/Unsafe.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/test/jdk/modules/scenarios/overlappingpackages/src/misc/jdk/internal/misc/Unsafe.java Thu May 19 13:08:36 2016 +0100 @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2015, 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. + */ + +package jdk.internal.misc; + +public class Unsafe { + private Unsafe() { } + + public static long getLong(long address) { + return 0L; + } +} diff -r 5d6ff7d76bf4 -r abb80b35c9dd jdk/test/jdk/modules/scenarios/overlappingpackages/src/misc/module-info.java --- a/jdk/test/jdk/modules/scenarios/overlappingpackages/src/misc/module-info.java Thu May 19 04:20:08 2016 -0700 +++ b/jdk/test/jdk/modules/scenarios/overlappingpackages/src/misc/module-info.java Thu May 19 13:08:36 2016 +0100 @@ -22,6 +22,6 @@ */ module misc { - exports sun.misc; + exports jdk.internal.misc; } diff -r 5d6ff7d76bf4 -r abb80b35c9dd jdk/test/jdk/modules/scenarios/overlappingpackages/src/misc/sun/misc/Unsafe.java --- a/jdk/test/jdk/modules/scenarios/overlappingpackages/src/misc/sun/misc/Unsafe.java Thu May 19 04:20:08 2016 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2015, 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. - */ - -package sun.misc; - -public class Unsafe { - private Unsafe() { } - - public static long getLong(long address) { - return 0L; - } -}