Skip to content
Permalink
Browse files
8256808: com/sun/jdi/CatchAllTest.java failed with "NullPointerExcept…
…ion: Cannot invoke "lib.jdb.Jdb.log(String)" because "this.jdb" is null"

Reviewed-by: cjplummer, sspitsyn
  • Loading branch information
Alex Menkov committed Dec 3, 2020
1 parent 8526947 commit c5b32b33eb698fc6383c73c6b103b67c3e9568f0
Showing with 6 additions and 6 deletions.
  1. +2 −2 test/jdk/com/sun/jdi/lib/jdb/Jdb.java
  2. +4 −4 test/jdk/com/sun/jdi/lib/jdb/JdbTest.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -260,7 +260,7 @@ public void quit() {
command(JdbCommand.quit());
}

void log(String s) {
private void log(String s) {
System.out.println(s);
}

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -94,9 +94,9 @@ public void run() {
setup();
runCases();
} catch (Throwable e) {
jdb.log("=======================================");
jdb.log("Exception thrown during test execution: " + e.getMessage());
jdb.log("=======================================");
System.out.println("=======================================");
System.out.println("Exception thrown during test execution: " + e.getMessage());
System.out.println("=======================================");
throw e;
} finally {
shutdown();

1 comment on commit c5b32b3

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on c5b32b3 Dec 3, 2020

Please sign in to comment.