8170987: Module system implementation refresh (12/2016)
Reviewed-by: mchung
This commit is contained in:
parent
686ec125eb
commit
28746a0dd4
@ -32,7 +32,6 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants;
|
|||||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
|
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
|
||||||
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
|
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UncheckedIOException;
|
|
||||||
import java.io.NotSerializableException;
|
import java.io.NotSerializableException;
|
||||||
import java.io.ObjectInputStream;
|
import java.io.ObjectInputStream;
|
||||||
import java.io.ObjectOutputStream;
|
import java.io.ObjectOutputStream;
|
||||||
@ -42,6 +41,7 @@ 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.ModuleReference;
|
import java.lang.module.ModuleReference;
|
||||||
|
import java.lang.module.ModuleReader;
|
||||||
import java.lang.reflect.Layer;
|
import java.lang.reflect.Layer;
|
||||||
import java.lang.reflect.Module;
|
import java.lang.reflect.Module;
|
||||||
import java.security.AccessController;
|
import java.security.AccessController;
|
||||||
@ -403,10 +403,12 @@ public final class TemplatesImpl implements Templates, Serializable {
|
|||||||
private Module createModule(ModuleDescriptor descriptor, ClassLoader loader) {
|
private Module createModule(ModuleDescriptor descriptor, ClassLoader loader) {
|
||||||
String mn = descriptor.name();
|
String mn = descriptor.name();
|
||||||
|
|
||||||
ModuleReference mref = new ModuleReference(descriptor, null, () -> {
|
ModuleReference mref = new ModuleReference(descriptor, null) {
|
||||||
IOException ioe = new IOException("<dynamic module>");
|
@Override
|
||||||
throw new UncheckedIOException(ioe);
|
public ModuleReader open() {
|
||||||
});
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
ModuleFinder finder = new ModuleFinder() {
|
ModuleFinder finder = new ModuleFinder() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user