RFR: 8339190: Parameter arrays that are capped during annotation processing report incorrect length [v2]
Jan Lahoda
jlahoda at openjdk.org
Tue Oct 29 12:34:06 UTC 2024
On Wed, 23 Oct 2024 18:16:57 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:
> I will update this PR and the CSR to fail if we detect an overflow, rather than warn users. Thanks Jan
>
> Though I am not sure why the check would need to be done when writing the classfile, why not do it earlier?
Some of the existing similar "limit" errors are basically only detectable when writing the classfile. So, for consistency, I think it would be good to do it at some place close to where the other errors are detected.
In principle, the javac "frontend" should mostly care about JLS, and JLS is not imposing any limits. The backend, when writing, needs to care about JVMS, which imposes limits, and hence that's probably the correct place to report the error.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21663#issuecomment-2444080318
More information about the compiler-dev
mailing list