--- old/test/hotspot/jtreg/runtime/exceptionMsgs/NullPointerException/NPEInHiddenTopFrameTest.java 2019-09-17 11:07:35.953332000 +0200 +++ new/test/hotspot/jtreg/runtime/exceptionMsgs/NullPointerException/NPEInHiddenTopFrameTest.java 2019-09-17 11:07:35.062319000 +0200 @@ -26,9 +26,10 @@ * @test * @summary Test NullPointerException messages thrown in frames that * are hidden in the backtrace/stackTrace. + * @bug 8218628 * @library /test/lib * @compile -g NPEInHiddenTopFrameTest.java - * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:-ShowHiddenFrames -XX:-ShowCodeDetailsInExceptionMessages NPEInHiddenTopFrameTest hidden + * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:-ShowHiddenFrames -XX:+ShowCodeDetailsInExceptionMessages NPEInHiddenTopFrameTest hidden * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+ShowHiddenFrames -XX:+ShowCodeDetailsInExceptionMessages NPEInHiddenTopFrameTest visible */ @@ -68,10 +69,11 @@ } catch (NullPointerException e) { checkMessage("concatter.someMethod(nullString, \"validString\");", e.getMessage(), framesAreHidden ? - // This is the message printed if the wrong method/bci are used: + // This is the message that would be printed if the wrong method/bci are used: // "Cannot invoke 'NPEInHiddenTopFrameTest$SomeFunctionalInterface.someMethod(String, String)'" + // " because 'concatter' is null." - // With this fix no message is printed. + // But the NPE message generation now recognizes this situation and skips the + // message. So we expect null: null : // This is the correct message, but it describes code generated on-the-fly. // You get it if you disable hiding frames (-XX:+ShowHiddenframes).