8233014: Enable ShowCodeDetailsInExceptionMessages by default

Reviewed-by: coleenp, stuefe, dholmes
This commit is contained in:
Goetz Lindenmaier 2020-06-18 22:03:18 +02:00
parent e208d9aa1f
commit bf1e6903a2
4 changed files with 8 additions and 8 deletions
src/hotspot/share/runtime
test
hotspot/jtreg
runtime/exceptionMsgs/NullPointerException
vmTestbase/jit/t/t104
langtools/jdk/jshell

@ -617,7 +617,7 @@ const size_t minimumSymbolTableSize = 1024;
product(bool, OmitStackTraceInFastThrow, true, \
"Omit backtraces for some 'hot' exceptions in optimized code") \
\
manageable(bool, ShowCodeDetailsInExceptionMessages, false, \
manageable(bool, ShowCodeDetailsInExceptionMessages, true, \
"Show exception messages from RuntimeExceptions that contain " \
"snippets of the failing code. Disable this to improve privacy.") \
\

@ -1,6 +1,6 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019 SAP SE. All rights reserved.
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2020 SAP SE. 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
@ -24,12 +24,12 @@
/**
* @test
* @summary Test that the default of flag ShowCodeDetailsInExceptionMessages is 'false',
* i.e., make sure the VM does not print the message on default.
* @summary Test that the default of flag ShowCodeDetailsInExceptionMessages is 'true',
* i.e., make sure the VM does print the message by default.
* @bug 8218628
* @library /test/lib
* @compile -g SuppressMessagesTest.java
* @run main/othervm SuppressMessagesTest noMessage
* @run main/othervm SuppressMessagesTest printMessage
*/
/**
* @test

@ -1,2 +1,2 @@
Exception thrown.
java.lang.NullPointerException
java.lang.NullPointerException: Cannot enter synchronized block because "<local1>" is null

@ -132,7 +132,7 @@ public class ToolSimpleTest extends ReplToolTesting {
+ "| Caused by: java.io.IOException: bar\n"
+ "| at n (#2:1)\n"
+ "| ...\n"
+ "| Caused by: java.lang.NullPointerException\n"
+ "| Caused by: java.lang.NullPointerException: Cannot invoke \"String.toString()\" because \"null\" is null\n"
+ "| at p (#1:1)\n"
+ "| ..."),
(a) -> assertCommand(a, "/drop p",