On Wed, 28 Jan 2026 16:13:14 GMT, Sean Coffey <[email protected]> wrote:

>> src/java.base/share/classes/sun/security/ssl/SSLLogger.java line 311:
>> 
>>> 309:      * Enabling subcomponents fine-tunes (filters) debug output.
>>> 310:      */
>>> 311:     public enum Opt {
>> 
>> Does this need to be public?
>
> Looks like there's some usage of SSLLogger outside of sun.security.ssl
> 
> e.g. sun/security/util/DomainName.java

Ah, I didn't know there were any consumers outside the SSL code.

>> src/java.base/share/classes/sun/security/ssl/SSLLogger.java line 494:
>> 
>>> 492: 
>>> 493:                 if (parameter instanceof Throwable) {
>>> 494:                     
>>> builder.append(formatThrowable((Throwable)parameter));
>> 
>> Nit:  from the Java Coding conventions, Section 8.2:
>> 
>>     Casts should be followed by a blank. Examples:
>>         myMethod((byte) aNum, (Object) x);
>>         myFunc((int) (cp + 5), ((int) (i + 3))
>> 
>> I don't have a strong preference here.  
>> 
>> If you do revert back, there are several places that got changed here.
>
> Thanks - I need to remember that coding convention. Seen different styles.
> I've taken an extra step here and introduced instanceof pattern matching 
> where possible. Cleans up the code some more.

That is one clean way to do it.  Doesn't backport well (11/8), but works well 
enough!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18764#discussion_r2738484618
PR Review Comment: https://git.openjdk.org/jdk/pull/18764#discussion_r2738493926

Reply via email to