hotspot/test/runtime/modules/LoadUnloadModuleStress.java
changeset 46404 ae62ba99a1a7
parent 44520 0553e129e0ec
equal deleted inserted replaced
46403:f2b91b928476 46404:ae62ba99a1a7
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    46 
    46 
    47     public static Object createModule() throws Throwable {
    47     public static Object createModule() throws Throwable {
    48         MyClassLoader cl = new MyClassLoader();
    48         MyClassLoader cl = new MyClassLoader();
    49         Object module = ModuleHelper.ModuleObject("mymodule", cl, new String [] {"PackageA"});
    49         Object module = ModuleHelper.ModuleObject("mymodule", cl, new String [] {"PackageA"});
    50         assertNotNull(module);
    50         assertNotNull(module);
    51         ModuleHelper.DefineModule(module, "9.0", "mymodule", new String[] { "PackageA" });
    51         ModuleHelper.DefineModule(module, false, "9.0", "mymodule", new String[] { "PackageA" });
    52         clweak = new WeakReference<>(cl);
    52         clweak = new WeakReference<>(cl);
    53         return module;
    53         return module;
    54     }
    54     }
    55 
    55 
    56     public static void main(String args[]) throws Throwable {
    56     public static void main(String args[]) throws Throwable {