Skip to content

Commit

Permalink
LSP Server: Catching NullPointer Exception in MoveRefactoring codeaction
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam71 committed Oct 29, 2024
1 parent 2eecf2a commit 6d8a989
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ private static Project getSelectedProject(NamedPath selectedProject) {
try {
String path = selectedProject.getPath();
return path != null ? FileOwnerQuery.getOwner(Utils.fromUri(path)) : null;
} catch (MalformedURLException ex) {
} catch (MalformedURLException | NullPointerException ex) {
return null;
}
}
Expand All @@ -432,7 +432,7 @@ private static FileObject getSelectedRoot(NamedPath selectedRoot) {
try {
String path = selectedRoot.getPath();
return path != null ? Utils.fromUri(path) : null;
} catch (MalformedURLException ex) {
} catch (MalformedURLException | NullPointerException ex) {
return null;
}
}
Expand Down

0 comments on commit 6d8a989

Please sign in to comment.