Incident Report 9079511: Java Language Enhancement: Disallow access to static members via object references
Archie Cobbs
archie.cobbs at gmail.com
Fri Jan 23 15:35:24 UTC 2026
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. -Xlint:static
-Werror.
I can't think of very many examples in the past. where Java made such a
change (that is, where (a) and (b) were true. I guess the treatment of "_"
and "yield" count.
-Archie
On Fri, Jan 23, 2026 at 6:43 AM Amazing Code <amazingcodewithus at gmail.com>
wrote:
> I am writing to propose a language enhancement regarding the handling of
> static member access in Java.
>
--
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20260123/015ef32d/attachment-0001.htm>
More information about the amber-dev
mailing list