Skip to content

Commit

Permalink
Fix NPE in EclipseSourceFileModule ctor (#1261)
Browse files Browse the repository at this point in the history
* Fix NPE in EclipseSourceFileModule ctor

The `getLocation()` API is returning `null`, resulting in an NPE. Use `getFullPath()` instead, which seems to work.
  • Loading branch information
khatchad authored Apr 11, 2023
1 parent 0e6fadb commit d15ca9b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static EclipseSourceFileModule createEclipseSourceFileModule(IFile f) {
}

private EclipseSourceFileModule(IFile f) {
super(new File(f.getLocation().toOSString()), f.getLocation().lastSegment(), null);
super(new File(f.getFullPath().toOSString()), f.getName(), null);
this.f = f;
}

Expand Down

0 comments on commit d15ca9b

Please sign in to comment.