RFR: 8256808: com/sun/jdi/CatchAllTest.java failed with "NullPointerException: Cannot invoke "lib.jdb.Jdb.log(String)" because "this.jdb" is null"

Aleksey Shipilev shade at openjdk.java.net
Thu Nov 26 18:06:59 UTC 2020


On Wed, 25 Nov 2020 21:36:12 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

> JdbTest can get exception before jdb field is initialized.
> As Jdb logging does not depend on the instance, made Jdb.log method static

test/jdk/com/sun/jdi/lib/jdb/JdbTest.java line 99:

> 97:             Jdb.log("=======================================");
> 98:             Jdb.log("Exception thrown during test execution: " + e.getMessage());
> 99:             Jdb.log("=======================================");

Why not just print it to `System.out` then, eliminating the method altogether?

-------------

PR: https://git.openjdk.java.net/jdk/pull/1443


More information about the serviceability-dev mailing list