mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8177530: Module system implementation refresh (4/2017)
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com> Reviewed-by: jjg
This commit is contained in:
parent
f6ed80af92
commit
481f056ca9
28 changed files with 112 additions and 67 deletions
|
@ -21,8 +21,6 @@
|
|||
* questions.
|
||||
*/
|
||||
|
||||
import java.lang.reflect.Layer;
|
||||
import java.lang.reflect.Module;
|
||||
import java.util.*;
|
||||
import javax.annotation.processing.*;
|
||||
import javax.lang.model.SourceVersion;
|
||||
|
@ -102,7 +100,7 @@ public abstract class JavacTestingAbstractProcessor extends AbstractProcessor {
|
|||
protected void addExports(String moduleName, String... packageNames) {
|
||||
for (String packageName : packageNames) {
|
||||
try {
|
||||
Layer layer = Layer.boot();
|
||||
ModuleLayer layer = ModuleLayer.boot();
|
||||
Optional<Module> m = layer.findModule(moduleName);
|
||||
if (!m.isPresent())
|
||||
throw new Error("module not found: " + moduleName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue