< prev index next >
src/jdk.compiler/share/classes/com/sun/tools/javac/code/ModuleFinder.java
Print this page
rev 48841 : imported patch 8187950
*** 87,96 ****
--- 87,98 ----
*/
private final JavaFileManager fileManager;
private final JCDiagnostic.Factory diags;
+ private final DeferredCompletionFailureHandler dcfh;
+
private ModuleNameReader moduleNameReader;
public ModuleNameFromSourceReader moduleNameFromSourceReader;
/** Get the ModuleFinder instance for this invocation. */
*** 109,118 ****
--- 111,121 ----
fileManager = context.get(JavaFileManager.class);
log = Log.instance(context);
classFinder = ClassFinder.instance(context);
diags = JCDiagnostic.Factory.instance(context);
+ dcfh = DeferredCompletionFailureHandler.instance(context);
}
class ModuleLocationIterator implements Iterator<Set<Location>> {
StandardLocation outer;
Set<Location> next = null;
*** 225,235 ****
name = moduleNameFromSourceReader.readModuleName(fo);
if (name == null) {
JCDiagnostic diag =
diags.fragment(Fragments.FileDoesNotContainModule);
ClassSymbol errModuleInfo = syms.defineClass(names.module_info, syms.errModule);
! throw new ClassFinder.BadClassFile(errModuleInfo, fo, diag, diags);
}
break;
case CLASS:
try {
name = names.fromString(readModuleName(fo));
--- 228,238 ----
name = moduleNameFromSourceReader.readModuleName(fo);
if (name == null) {
JCDiagnostic diag =
diags.fragment(Fragments.FileDoesNotContainModule);
ClassSymbol errModuleInfo = syms.defineClass(names.module_info, syms.errModule);
! throw new ClassFinder.BadClassFile(errModuleInfo, fo, diag, diags, dcfh);
}
break;
case CLASS:
try {
name = names.fromString(readModuleName(fo));
< prev index next >