JDK-8185855 : Debug exception stacks should be clearer
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • CPU: generic
  • Submitted: 2017-08-04
  • Updated: 2019-01-14
  • Resolved: 2017-12-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 8
10 b35Fixed 8u192Fixed
Description
end users get confused when they see exception stacks printed in debug mode from JDK classes. Some equate it to a problem in the JDK libs. 

example code : 

632             KeyStore keyStore = null;
633             try {
634                 keyStore = PolicyUtil.getKeyStore
635                                 (policy,
636                                 pp.getKeyStoreUrl(),
637                                 pp.getKeyStoreType(),
638                                 pp.getKeyStoreProvider(),
639                                 pp.getStorePassURL(),
640                                 debug);
641             } catch (Exception e) {
642                 // ignore, treat it like we have no keystore
643                 if (debug != null) {
644                     e.printStackTrace();
645                 }
646             }

We should be more clear and perhaps prepend such traces with a clue like "Running in debug mode and printing this stack trace for reference���"