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 27, 2020
1 parent 5ff8503 commit 6dd5a94
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ maven-eclipse.xml
!.idea/codeStyleSettings.xml
*.iml

# VSCode
.vscode

# Spoon
spooned-classes/
spooned/
Expand All @@ -31,3 +34,6 @@ doc/_jekyll/_site/

# Nodejs
node_modules/

# Gradle
.gradle
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 6dd5a94

Please sign in to comment.