[prev in list] [next in list] [prev in thread] [next in thread] 

List:       logback-user
Subject:    Re: [logback-user] logback 1.2.3 java11 compatibility
From:       Ralph Goers <rgoers () apache ! org>
Date:       2021-03-11 18:15:42
Message-ID: 546DA43D-D5EC-440E-B9D0-CB503462C48A () apache ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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@qos.ch <mailto:logback-user@qos.ch>
> http://mailman.qos.ch/mailman/listinfo/logback-user \
> <http://mailman.qos.ch/mailman/listinfo/logback-user>


[Attachment #5 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
line-break: after-white-space;" class="">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.<div class=""><br class=""></div><div class="">Note, I don't work on \
Logback so I can't answer your question on when it will use StackWalker.</div><div \
class=""><br class=""></div><div class="">Ralph<br class=""></div><div class=""><br \
class=""></div><div><blockquote type="cite" class=""><div class="">On Mar 11, 2021, \
at 3:28 AM, Baranes, Ofer &lt;<a href="mailto:ofer.baranes@finastra.com" \
class="">ofer.baranes@finastra.com</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><div class="WordSection1" \
style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;"><div style="margin: 0in; font-size: 11pt; font-family: \
Calibri, sans-serif;" class="">Hi there,<o:p class=""></o:p></div><p \
class="MsoNormal" style="margin: 0in 0in 12pt; font-size: 11pt; font-family: Calibri, \
sans-serif;"><span style="font-size: 10.5pt; font-family: -apple-system; color: \
rgb(36, 41, 46); background-color: white; background-position: initial initial; \
background-repeat: initial initial;" class="">When checking compatibility to java11 \
using jdep, that was the output:<o:p class=""></o:p></span></p><div style="margin: \
0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span \
style="font-size: 10.5pt; font-family: -apple-system; color: rgb(36, 41, 46); \
background-color: white; background-position: initial initial; background-repeat: \
initial initial;" class="">jdeps.exe -jdkinternals logback-classic-1.2.3.jar<o:p \
class=""></o:p></span></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; \
font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; \
font-family: -apple-system; color: rgb(36, 41, 46); background-color: white; \
background-position: initial initial; background-repeat: initial initial;" \
class=""><o:p class="">&nbsp;</o:p></span></div><div style="margin: 0in 0in 0in \
0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" \
class="">logback-classic-1.2.3.jar -&gt; JDK removed internal API<o:p \
class=""></o:p></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; \
font-family: Calibri, sans-serif;" class="">&nbsp;&nbsp; \
ch.qos.logback.classic.spi.PackagingDataCalculator -&gt; \
sun.reflect.Reflection&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
JDK internal API (JDK removed internal API)<o:p class=""></o:p></div><div \
style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" \
class=""><o:p class="">&nbsp;</o:p></div><div style="margin: 0in 0in 0in 0.5in; \
font-size: 11pt; font-family: Calibri, sans-serif;" class="">Warning: JDK internal \
APIs are unsupported and private to JDK implementation that are<o:p \
class=""></o:p></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; \
font-family: Calibri, sans-serif;" class="">subject to be removed or changed \
incompatibly and could break your application.<o:p class=""></o:p></div><div \
style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" \
class="">Please modify your code to eliminate dependence on any JDK internal \
APIs.<o:p class=""></o:p></div><div style="margin: 0in 0in 0in 0.5in; font-size: \
11pt; font-family: Calibri, sans-serif;" class="">For the most recent update on JDK \
internal API replacements, please check:<o:p class=""></o:p></div><div style="margin: \
0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><a \
href="https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool" \
style="color: rgb(5, 99, 193); text-decoration: underline;" \
class="">https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool</a><o:p \
class=""></o:p></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; \
font-family: Calibri, sans-serif;" class=""><o:p class="">&nbsp;</o:p></div><div \
style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" \
class="">JDK Internal \
API&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Suggested Replacement<o:p class=""></o:p></div><div style="margin: 0in 0in 0in 0.5in; \
font-size: 11pt; font-family: Calibri, sans-serif;" \
class="">----------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;---------------------<o:p \
class=""></o:p></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; \
font-family: Calibri, sans-serif;" \
class="">sun.reflect.Reflection&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Use java.lang.StackWalker @since 9<o:p class=""></o:p></div><div style="margin: 0in \
0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p \
class="">&nbsp;</o:p></div><div style="margin: 0in; font-size: 11pt; font-family: \
Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; font-family: \
-apple-system; color: rgb(36, 41, 46); background-color: white; background-position: \
initial initial; background-repeat: initial initial;" class="">Would there be a \
compatible version to java 11? If so then When?</span><span style="font-size: 10.5pt; \
font-family: -apple-system; color: rgb(36, 41, 46);" class=""><br class=""><span \
style="background-color: white; background-position: initial initial; \
background-repeat: initial initial;" class="">Is there any way to evaluate if this \
code would not be reachable on specific project?<o:p \
class=""></o:p></span></span></div><div style="margin: 0in; font-size: 11pt; \
font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; \
font-family: -apple-system; color: rgb(36, 41, 46); background-color: white; \
background-position: initial initial; background-repeat: initial initial;" \
class=""><o:p class="">&nbsp;</o:p></span></div><div style="margin: 0in; font-size: \
11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; \
font-family: -apple-system; color: rgb(36, 41, 46); background-color: white; \
background-position: initial initial; background-repeat: initial initial;" \
class="">Thanks<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: \
11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 10.5pt; \
font-family: -apple-system; color: rgb(36, 41, 46); background-color: white; \
background-position: initial initial; background-repeat: initial initial;" \
class="">Ofer</span><o:p class=""></o:p></div></div><span style="caret-color: rgb(0, \
0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: \
inline !important;" class="">"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. \
_______________________________________________</span><br style="caret-color: rgb(0, \
0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span \
style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; \
float: none; display: inline !important;" class="">logback-user mailing \
list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: \
12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
text-decoration: none;" class=""><a href="mailto:logback-user@qos.ch" style="color: \
rgb(5, 99, 193); text-decoration: underline; font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; \
-webkit-text-stroke-width: 0px;" class="">logback-user@qos.ch</a><br \
style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; text-align: start; text-indent: 0px; text-transform: none; white-space: \
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" \
class=""><a href="http://mailman.qos.ch/mailman/listinfo/logback-user" style="color: \
rgb(5, 99, 193); text-decoration: underline; font-family: Helvetica; font-size: 12px; \
font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: \
normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; \
-webkit-text-stroke-width: 0px;" \
class="">http://mailman.qos.ch/mailman/listinfo/logback-user</a></div></blockquote></div><br \
class=""></body></html>


[Attachment #6 (text/plain)]

_______________________________________________
logback-user mailing list
logback-user@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic