[logback-user] logback 1.2.3 java11 compatibility

Ralph Goers rgoers at apache.org
Thu Mar 11 19:15:42 CET 2021


If you check PackagingDataCalculator you will see that if the Reflection class is not available it will fallback to generating a Throwable and walking that to determine the caller’s location, so even 1.2.3 should be compatible with Java 11. In the latest 1.3.0 version the call to sun.reflect.Reflection has been commented out so it should no longer cause that warning message.

Note, I don’t work on Logback so I can’t answer your question on when it will use StackWalker.

Ralph

> On Mar 11, 2021, at 3:28 AM, Baranes, Ofer <ofer.baranes at finastra.com> wrote:
> 
> Hi there,
> When checking compatibility to java11 using jdep, that was the output:
> 
> jdeps.exe -jdkinternals logback-classic-1.2.3.jar
>  
> logback-classic-1.2.3.jar -> JDK removed internal API
>    ch.qos.logback.classic.spi.PackagingDataCalculator -> sun.reflect.Reflection                             JDK internal API (JDK removed internal API)
>  
> Warning: JDK internal APIs are unsupported and private to JDK implementation that are
> subject to be removed or changed incompatibly and could break your application.
> Please modify your code to eliminate dependence on any JDK internal APIs.
> For the most recent update on JDK internal API replacements, please check:
> https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool <https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool>
>  
> JDK Internal API                         Suggested Replacement
> ----------------                         ---------------------
> sun.reflect.Reflection                   Use java.lang.StackWalker @since 9
>  
> Would there be a compatible version to java 11? If so then When?
> Is there any way to evaluate if this code would not be reachable on specific project?
>  
> Thanks
> Ofer
> "FINASTRA" is the trade name of the FINASTRA group of companies. This email and any attachments have been scanned for known viruses using multiple scanners. This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. This email does not constitute the commencement of legal relations between you and FINASTRA. Please refer to the executed contract between you and the relevant member of the FINASTRA group for the identity of the contracting party with which you are dealing. _______________________________________________
> logback-user mailing list
> logback-user at qos.ch <mailto:logback-user at qos.ch>
> http://mailman.qos.ch/mailman/listinfo/logback-user <http://mailman.qos.ch/mailman/listinfo/logback-user>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20210311/b92125dd/attachment.html>


More information about the logback-user mailing list