Skip to content

Commit

Permalink
Fix NPE in ClassPathHelper.getParent when classpath is close to drive…
Browse files Browse the repository at this point in the history
… root.
  • Loading branch information
C0D3-M4513R authored Jan 16, 2024
1 parent 9514d14 commit e710a9a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ private static String getParent(int levels, Path path) {
if (parent == null)
return null;
}
return parent == null ? null : parent.getFileName().toString();
if (parent == null) return null;
var fileName = parent.getFileName();
if (fileName == null) return null;
return fileName.toString();
}

private static String getProjectName(int levels, Path path) {
Expand Down

0 comments on commit e710a9a

Please sign in to comment.