RFR: 8369995: Implement extra logging and/or propagate errors in X509KeyManagerImpl and fix StringIndexOutOfBoundsException [v2]

Mikhail Yankelevich myankelevich at openjdk.org
Fri Oct 17 12:18:49 UTC 2025


On Thu, 16 Oct 2025 19:24:06 GMT, Artur Barashev <abarashev at openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/ssl/X509KeyManagerImpl.java line 251:
>> 
>>> 249:             // ignore and only log exception
>>> 250:             if (SSLLogger.isOn && SSLLogger.isOn("keymanager")) {
>>> 251:                 SSLLogger.fine("KeyMgr: exception triggered: " + e);
>> 
>> I think this should be logged at `warning` level.
>
> Also, `KeyMgr:` string can be removed, the logger will prepend the message with the full class name and line number.

I agree with logging this as warning. However I think keeping `KeyMgr:` would be better, as this format is used in the existing code in the class. What do you think?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27851#discussion_r2439693629


More information about the security-dev mailing list