Skip to content

Commit

Permalink
Fallback to resolving compilation unit from filename as previously
Browse files Browse the repository at this point in the history
  • Loading branch information
Strum355 committed Aug 30, 2020
1 parent 5ff8503 commit 1f9876d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,14 @@ public CompilationUnit[] getCompilationUnits() {
} else {
lastSlash += 1;
}
compilationUnit.module = this.module.name();

if (this.module == null) {
compilationUnit.module = CharOperation.subarray(modulePath, lastSlash, modulePath.length);
} else {
//TODO the module name parsed by JDK compiler is in `this.modNames`, consider using that instead?
compilationUnit.module = this.module.name();
}

pathToModName.put(String.valueOf(modulePath), compilationUnit.module);
}
} else {
Expand Down

0 comments on commit 1f9876d

Please sign in to comment.