<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Archie Cobbs" <archie.cobbs@gmail.com><br><b>To: </b>"attila kelemen85" <attila.kelemen85@gmail.com><br><b>Cc: </b>"Amazing Code" <amazingcodewithus@gmail.com>, "amber-dev" <amber-dev@openjdk.org><br><b>Sent: </b>Saturday, January 24, 2026 3:07:47 PM<br><b>Subject: </b>Re: Incident Report 9079511: Java Language Enhancement: Disallow access to static members via object references<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div>Funny you should mention that... :)</div><br><div>In JDK 26+ you will be able to do this via flags like <span style="font-family:monospace">-Werror:static</span></div><br><div>See <a href="https://bugs.openjdk.org/browse/JDK-8349847" target="_blank">https://bugs.openjdk.org/browse/JDK-8349847</a> for details.</div><br><div>-Archie</div></div></blockquote><div><br></div><div>IDEs were able to do that since a long time,</div><div>it was long overdue.</div><div><br data-mce-bogus="1"></div><div>Soon we will be able to turn those nullcheck warnings into errors. </div><div><br data-mce-bogus="1"></div><div>Thanks Archie.</div><div><br data-mce-bogus="1"></div><div>Rémi </div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sat, Jan 24, 2026 at 7:08 AM Attila Kelemen <<a href="mailto:attila.kelemen85@gmail.com" target="_blank">attila.kelemen85@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>My $0.02: This is an easy call. The answer is that it's not worth changing because (b) this would cause legacy to to start failing to compile, which is violates Java's stellar reputation for backward compatibility, and (b) there is already a perfectly reasonable workaround, i.e. <span style="font-family:monospace">-Xlint:static -Werror</span><span style="font-family:arial,sans-serif">.</span></div></div></div></blockquote><br><div>I'm not arguing that the original request should be implemented and break existing code (bad as they are). However, this suggestion doesn't really work, because javac doesn't support different sets of values for `Werror` and for mere warnings. That is, I usually want to turn on almost everything for `Xlint` , but I definitely don't want every warning to be an error (most notably, I don't want `@deprecated` to immediately fail compilation, but I want it to be reported as a warning).</div></div></div>
</blockquote></div><div><br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Archie L. Cobbs</div></div><br></blockquote></div></div></body></html>