Skip to content

Commit

Permalink
8256808: com/sun/jdi/CatchAllTest.java failed with "NullPointerExcept…
Browse files Browse the repository at this point in the history
…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 c5b32b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/jdk/com/sun/jdi/lib/jdb/Jdb.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -260,7 +260,7 @@ public void quit() {
command(JdbCommand.quit());
}

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

Expand Down
8 changes: 4 additions & 4 deletions test/jdk/com/sun/jdi/lib/jdb/JdbTest.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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();
Expand Down

1 comment on commit c5b32b3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.