equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, 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. |
47 ModuleHelper.DefineModule(m, "9.0", "mymodule/here", new String[] { "mypackage" }); |
47 ModuleHelper.DefineModule(m, "9.0", "mymodule/here", new String[] { "mypackage" }); |
48 |
48 |
49 /* Invalid test, won't compile. |
49 /* Invalid test, won't compile. |
50 // Invalid classloader argument, expect an IAE |
50 // Invalid classloader argument, expect an IAE |
51 try { |
51 try { |
52 m = ModuleHelper.ModuleObject("mymodule1", new Object(), new String[] { "mypackage1" }); |
52 m = ModuleHelper.ModuleObject("mymodule_one", new Object(), new String[] { "mypackage1" }); |
53 ModuleHelper.DefineModule(m, "9.0", "mymodule/here", new String[] { "mypackage1" }); |
53 ModuleHelper.DefineModule(m, "9.0", "mymodule/here", new String[] { "mypackage1" }); |
54 throw new RuntimeException("Failed to get expected IAE for bad loader"); |
54 throw new RuntimeException("Failed to get expected IAE for bad loader"); |
55 } catch(IllegalArgumentException e) { |
55 } catch(IllegalArgumentException e) { |
56 // Expected |
56 // Expected |
57 } |
57 } |