generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch for MoveRefactoring null error fix
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/refactoring/MoveRefactoring.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/refactoring/MoveRefactoring.java | ||
index a72abd44ef..199ffad108 100644 | ||
--- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/refactoring/MoveRefactoring.java | ||
+++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/refactoring/MoveRefactoring.java | ||
@@ -423,7 +423,7 @@ public final class MoveRefactoring extends CodeRefactoring { | ||
try { | ||
String path = selectedProject.getPath(); | ||
return path != null ? FileOwnerQuery.getOwner(Utils.fromUri(path)) : null; | ||
- } catch (MalformedURLException ex) { | ||
+ } catch (MalformedURLException | NullPointerException ex) { | ||
return null; | ||
} | ||
} | ||
@@ -432,7 +432,7 @@ public final class MoveRefactoring extends CodeRefactoring { | ||
try { | ||
String path = selectedRoot.getPath(); | ||
return path != null ? Utils.fromUri(path) : null; | ||
- } catch (MalformedURLException ex) { | ||
+ } catch (MalformedURLException | NullPointerException ex) { | ||
return null; | ||
} | ||
} |