Skip to content

Updated the patch for MoveRefactoringFix based on the netbeans PR review #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
patches/7750.diff
patches/7910.diff
patches/7921.diff
patches/7923_draft.diff
patches/7923.diff
patches/7926.diff
patches/mvn-sh.diff
patches/generate-dependencies.diff
Expand Down
24 changes: 24 additions & 0 deletions patches/7923.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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..12acbc7081 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
@@ -420,6 +420,9 @@ public final class MoveRefactoring extends CodeRefactoring {
}

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;
@@ -429,6 +432,9 @@ public final class MoveRefactoring extends CodeRefactoring {
}

private static FileObject getSelectedRoot(NamedPath selectedRoot) {
+ if (selectedRoot == null) {
+ return null;
+ }
try {
String path = selectedRoot.getPath();
return path != null ? Utils.fromUri(path) : null;
36 changes: 0 additions & 36 deletions patches/7923_draft.diff

This file was deleted.