hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java
changeset 44520 0553e129e0ec
parent 43665 4bb003cad9b9
child 46480 77e911558d21
--- a/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java	Thu Apr 06 17:01:01 2017 +0000
+++ b/hotspot/test/serviceability/jvmti/GetModulesInfo/JvmtiGetAllModulesTest.java	Fri Apr 07 08:04:46 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -28,8 +28,6 @@
  * @run main/othervm -agentlib:JvmtiGetAllModulesTest JvmtiGetAllModulesTest
  *
  */
-import java.lang.reflect.Layer;
-import java.lang.reflect.Module;
 import java.lang.module.ModuleReference;
 import java.lang.module.ModuleFinder;
 import java.lang.module.ModuleReader;
@@ -79,15 +77,15 @@
         final String MY_MODULE_NAME = "myModule";
 
         // Verify that JVMTI reports exactly the same info as Java regarding the named modules
-        Asserts.assertEquals(Layer.boot().modules(), getModulesJVMTI());
+        Asserts.assertEquals(ModuleLayer.boot().modules(), getModulesJVMTI());
 
         // Load a new named module
         ModuleDescriptor descriptor = ModuleDescriptor.newModule(MY_MODULE_NAME).build();
         ModuleFinder finder = finderOf(descriptor);
         ClassLoader loader = new ClassLoader() {};
-        Configuration parent = Layer.boot().configuration();
+        Configuration parent = ModuleLayer.boot().configuration();
         Configuration cf = parent.resolve(finder, ModuleFinder.of(), Set.of(MY_MODULE_NAME));
-        Layer my = Layer.boot().defineModules(cf, m -> loader);
+        ModuleLayer my = ModuleLayer.boot().defineModules(cf, m -> loader);
 
         // Verify that the loaded module is indeed reported by JVMTI
         Set<Module> jvmtiModules = getModulesJVMTI();