8170987: Module system implementation refresh (12/2016)
Reviewed-by: mchung
This commit is contained in:
parent
aa2ae08345
commit
090b01cc41
@ -39,7 +39,6 @@ import java.io.File;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.UncheckedIOException;
|
|
||||||
import java.lang.invoke.MethodHandle;
|
import java.lang.invoke.MethodHandle;
|
||||||
import java.lang.invoke.MethodHandles;
|
import java.lang.invoke.MethodHandles;
|
||||||
import java.lang.invoke.MethodType;
|
import java.lang.invoke.MethodType;
|
||||||
@ -49,6 +48,7 @@ import java.lang.ref.SoftReference;
|
|||||||
import java.lang.module.Configuration;
|
import java.lang.module.Configuration;
|
||||||
import java.lang.module.ModuleDescriptor;
|
import java.lang.module.ModuleDescriptor;
|
||||||
import java.lang.module.ModuleFinder;
|
import java.lang.module.ModuleFinder;
|
||||||
|
import java.lang.module.ModuleReader;
|
||||||
import java.lang.module.ModuleReference;
|
import java.lang.module.ModuleReference;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.lang.reflect.Layer;
|
import java.lang.reflect.Layer;
|
||||||
@ -1349,10 +1349,12 @@ public final class Context {
|
|||||||
static Module createModuleTrusted(final Layer parent, final ModuleDescriptor descriptor, final ClassLoader loader) {
|
static Module createModuleTrusted(final Layer parent, final ModuleDescriptor descriptor, final ClassLoader loader) {
|
||||||
final String mn = descriptor.name();
|
final String mn = descriptor.name();
|
||||||
|
|
||||||
final ModuleReference mref = new ModuleReference(descriptor, null, () -> {
|
final ModuleReference mref = new ModuleReference(descriptor, null) {
|
||||||
IOException ioe = new IOException("<dynamic module>");
|
@Override
|
||||||
throw new UncheckedIOException(ioe);
|
public ModuleReader open() {
|
||||||
});
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
final ModuleFinder finder = new ModuleFinder() {
|
final ModuleFinder finder = new ModuleFinder() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user