diff --git a/build.xml b/build.xml index bd9f67d5..d400bfb2 100644 --- a/build.xml +++ b/build.xml @@ -59,6 +59,7 @@ patches/7893-draft.diff patches/8442-draft.diff patches/8460-draft.diff + patches/8470-draft.diff patches/disable-error-notification.diff patches/mvn-sh.diff patches/project-marker-jdk.diff diff --git a/patches/8470-draft.diff b/patches/8470-draft.diff new file mode 100644 index 00000000..b03ca272 --- /dev/null +++ b/patches/8470-draft.diff @@ -0,0 +1,18 @@ +diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java +index 01d92d5c82a3..49676ecae0a7 100644 +--- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java ++++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java +@@ -563,12 +563,7 @@ public void finished(boolean success) { + protected static @CheckForNull Pair findTarget(Project prj, boolean preferProjActions, FileObject toRun, SingleMethod singleMethod, NestedClass nestedClass, boolean debug, boolean testRun, boolean testInParallel, ContainedProjectFilter projectFilter) { + ClassPath sourceCP = ClassPath.getClassPath(toRun, ClassPath.SOURCE); + FileObject fileRoot = sourceCP != null ? sourceCP.findOwnerRoot(toRun) : null; +- boolean mainSource; +- if (fileRoot != null) { +- mainSource = UnitTestForSourceQuery.findUnitTests(fileRoot).length > 0; +- } else { +- mainSource = !testRun; +- } ++ boolean mainSource = !testRun; + ActionProvider provider = null; + String command = null; + Collection actionProviders = findActionProviders(prj);