Skip to content

Commit bc8b9f7

Browse files
authored
Specify displayName to avoid NPE (apache#8474)
2 parents 92eb77d + 847808d commit bc8b9f7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/launch/NbLaunchDelegate.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"ERR_LaunchDefaultConfiguration=the default one.",
109109
"# {0} - the recommended configuration",
110110
"ERR_LaunchSupportiveConfigName=\"{0}\"",
111+
"CTL_NativeImageDebugger=Native Image Debugger"
111112
})
112113
public abstract class NbLaunchDelegate {
113114

@@ -460,6 +461,7 @@ private static void startNativeDebug(File nativeImageFile, List<String> args,
460461
StartDebugParameters.Builder parametersBuilder = StartDebugParameters.newBuilder(command)
461462
.debugger(miDebugger)
462463
.debuggerDisplayObjects(false)
464+
.displayName(Bundle.CTL_NativeImageDebugger())
463465
.executionDescriptor(executionDescriptor)
464466
.lookup(contextLookup);
465467
StartDebugParameters parameters = parametersBuilder.build();

java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/ui/AbstractLspInputOutputProvider.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.io.PrintWriter;
2727
import java.io.Reader;
2828
import java.io.Writer;
29+
import java.util.Objects;
2930
import java.util.Set;
3031
import org.netbeans.api.io.Hyperlink;
3132
import org.netbeans.api.io.OutputColor;
@@ -153,6 +154,9 @@ public static final class LspIO {
153154
final LspWriter err;
154155

155156
LspIO(String name, IOContext ioCtx, Lookup lookup) {
157+
Objects.requireNonNull(name);
158+
Objects.requireNonNull(ioCtx);
159+
Objects.requireNonNull(lookup);
156160
this.name = name;
157161
this.ctx = ioCtx;
158162
this.lookup = lookup;

0 commit comments

Comments
 (0)