[8u] RFR 8253932: SSL debug log prints incorrect caller info
Hohensee, Paul
hohensee at amazon.com
Thu Oct 29 15:26:52 UTC 2020
Thanks for the explanation, Alexey. Reviewed.
Paul
On 10/29/20, 1:07 AM, "Alexey Bakhtin" <alexey at azul.com> wrote:
Hello Paul,
Thank you for review.
The logging API was changed by JEP-269 in JDK9. JEP-269 introduced java.lang.System.Logger as a main starting point for Logging functionality. JDK8 still use java.util.logging.Logger class for this purposes. There are no java.lang.System.Logger in JDK8. So, I think replacing “java.lang.System” with Logger.class.getName() (where Logger is java.util.logging.Logger class) is correct
Regards
Alexey
> On 28 Oct 2020, at 22:22, Hohensee, Paul <hohensee at amazon.com> wrote:
>
> Hi, Alexey,
>
> The JDK 11 code is
>
> private static String formatCaller() {
> return StackWalker.getInstance().walk(s ->
> s.dropWhile(f ->
> f.getClassName().startsWith("sun.security.ssl.SSLLogger") ||
> f.getClassName().startsWith("java.lang.System"))
> .map(f -> f.getFileName() + ":" + f.getLineNumber())
> .findFirst().orElse("unknown caller"));
> }
>
> While replacing "sun.security.ssl.SSLLogger" with SSLLogger.class.getName() looks like it doesn't change the semantics of the sub-expression, replacing "java.lang.System" with Logger.class.getName() looks like it does. Maybe add Logger.class.getName() rather than replacing "java.lang.System"?
>
> I didn't review the TLS 1.3 backport, so if the above doesn't make sense, please excuse my ignorance. :)
>
> Thanks,
> Paul
>
> On 10/2/20, 6:19 AM, "jdk8u-dev on behalf of Alexey Bakhtin" <jdk8u-dev-retn at openjdk.java.net on behalf of alexey at azul.com> wrote:
>
> Hi All,
>
> Please review small fix for SSL debug logger caused by JDK-8245466
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8253932
> Webrev: http://cr.openjdk.java.net/~abakhtin/8253932/webrev.v0/
>
> Regards
> Alexey
>
>
More information about the jdk8u-dev
mailing list