Skip to content

Commit

Permalink
Merge pull request #7923 from shivam71/MoveRefactoring_Fix
Browse files Browse the repository at this point in the history
LSP Server: Adding Null Checks in MoveRefactoring code action
  • Loading branch information
mbien authored Nov 7, 2024
2 parents 813ddb8 + 0bb6141 commit 7d89336
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ void doRefactoring(MoveElementUI ui) {
}

private static Project getSelectedProject(NamedPath selectedProject) {
if (selectedProject == null) {
return null;
}
try {
String path = selectedProject.getPath();
return path != null ? FileOwnerQuery.getOwner(Utils.fromUri(path)) : null;
Expand All @@ -429,6 +432,9 @@ private static Project getSelectedProject(NamedPath selectedProject) {
}

private static FileObject getSelectedRoot(NamedPath selectedRoot) {
if (selectedRoot == null) {
return null;
}
try {
String path = selectedRoot.getPath();
return path != null ? Utils.fromUri(path) : null;
Expand Down

0 comments on commit 7d89336

Please sign in to comment.