From d15ca9b6eac43b9bcca0524ac4068c81cf9ff096 Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Tue, 11 Apr 2023 12:34:33 -0400 Subject: [PATCH] Fix NPE in EclipseSourceFileModule ctor (#1261) * Fix NPE in EclipseSourceFileModule ctor The `getLocation()` API is returning `null`, resulting in an NPE. Use `getFullPath()` instead, which seems to work. --- .../com/ibm/wala/ide/classloader/EclipseSourceFileModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ide/src/main/java/com/ibm/wala/ide/classloader/EclipseSourceFileModule.java b/ide/src/main/java/com/ibm/wala/ide/classloader/EclipseSourceFileModule.java index 1680a51f07..f62fa3ab89 100644 --- a/ide/src/main/java/com/ibm/wala/ide/classloader/EclipseSourceFileModule.java +++ b/ide/src/main/java/com/ibm/wala/ide/classloader/EclipseSourceFileModule.java @@ -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; }