RFR: 8185855: Debug exception stacks should be clearer

Sean Mullan sean.mullan at oracle.com
Tue Dec 5 20:41:44 UTC 2017


On 12/5/17 9:27 AM, Seán Coffey wrote:
> Looking to improve the stacktrace output made when debug mode is enabled 
> for java.security and sun.security classes. In the past, some of these 
> have led to confusion for end users. Best to add some context when we're 
> printing stacktrace for informational, debug, purposes.
> 
> https://bugs.openjdk.java.net/browse/JDK-8185855
> 
> webrev : http://cr.openjdk.java.net/~coffeys/webrev.8185855/webrev/
> 
> The one minor functional change I've made is in 
> sun/security/util/AnchorCertificates.java
> I figured that it's best to print some context around a stacktrace that 
> we're about to print rather than print it only in debug mode.

I would probably put the e.printStackTrace inside the debug, seems odd 
to have the trace dumped to stderr even if debug is not set.

Looks fine otherwise.

--Sean


More information about the security-dev mailing list