test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsHelper.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsHelper.java	Fri Apr  6 15:48:26 2018
--- new/test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsHelper.java	Fri Apr  6 15:48:26 2018

*** 1,7 **** --- 1,7 ---- /* ! * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 2015, 2018, 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.
*** 63,79 **** --- 63,90 ---- if (clazz != null && i != excludeModIdx) { // Make sure we got the expected defining ClassLoader testLoader(clazz, expectedLoaders[i]); ! // Make sure the class is not in the shared space + // because CDS is disabled with --limit-modules during run time. + if (excludeModIdx != -1) { + if (wb.isSharedClass(clazz)) { + throw new RuntimeException(clazz.getName() + + ".class should not be in the shared space. " + + "loader=" + clazz.getClassLoader() + " module=" + clazz.getModule().getName()); + } + } else { + // class should be in the shared space if --limit-modules + // isn't specified during run time if (!wb.isSharedClass(clazz)) { throw new RuntimeException(clazz.getName() + ".class should be in the shared space. " + "loader=" + clazz.getClassLoader() + " module=" + clazz.getModule().getName()); } } + } clazz = null; } } /**

test/hotspot/jtreg/runtime/appcds/jigsaw/limitmods/LimitModsHelper.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File