From 383e6e4a6a1f32501b14e8eea75d70511cc0f676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=A4sing?= Date: Sun, 21 Jun 2026 20:41:12 +0200 Subject: [PATCH] Gradle "Go to source" on callstack entries does not work The code always yielded the string representation of the current line as the string contenation is evaluated the the null check in the ternary expression is checked. That is never null and thus line is returned. What was meant here is that the first part of the string should be the "location" (classname) followed by a colon and either the line number or the method name. Add parantheses to fix this. Closes: #9454 --- .../org/netbeans/modules/gradle/java/api/output/Location.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/gradle.java/src/org/netbeans/modules/gradle/java/api/output/Location.java b/java/gradle.java/src/org/netbeans/modules/gradle/java/api/output/Location.java index d8a1844f599c..28689729f4f2 100644 --- a/java/gradle.java/src/org/netbeans/modules/gradle/java/api/output/Location.java +++ b/java/gradle.java/src/org/netbeans/modules/gradle/java/api/output/Location.java @@ -197,7 +197,7 @@ public static final Location locationFromCallStackItem(String item) { ret.append(className.replace('.', '/')); } ret.append(".java"); - return Location.parseLocation(ret.toString() + ":" + line != null ? line : methodName); + return Location.parseLocation(ret.toString() + ":" + (line != null ? line : methodName)); } else { return null; }