Incident Report 9079511: Java Language Enhancement: Disallow access to static members via object references
Mahied Maruf
contact at mechite.com
Mon Jan 26 04:09:28 UTC 2026
> Kamlesh says:
> If this sounds reasonable, I can prepare:
> - small reference implementation (javac plugin + sample Maven config)
> - short JEP-style note describing migration story and sample fixes.
Just to say that I personally do not find this enough of a problem to
demand individual SPI providers (and/or Maven, Gradle, IDE plugins).
The existing tooling does a fantastic job, and also just to note:
> IntelliJ quick-fix to perform safe replacements
...IDEA can already do this reasonably well.
"Qualify static 'example()' call with reference to class Example".
The only thing that was mentioned on IDEA was the inability to _not_
trigger nullability inspections against a `null` reference when calling
static methods against it. That would actually be _weakening_ the
static analysis, but making it semantically correct.
I consider this a solution looking for a problem.
Best regards,
Mahied Maruf <contact at mechite.com>
More information about the amber-dev
mailing list