[jdk8u-dev] RFR: 8058322: Zero name_index item of MethodParameters attribute cause MalformedParameterException.

duke duke at openjdk.org
Thu Oct 24 16:40:13 UTC 2024


On Tue, 8 Oct 2024 17:11:01 GMT, Chen Liang <liach at openjdk.org> wrote:

> An out-of-spec behavior of core reflection causes it to fail when it encounters class files that conform to JVMS for release 8. In [JVMS § 4.7.24](https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.24) parameters are allowed to have `null` (CP reference 0) names, but core reflection didn't accept it.
> 
> This problem was relatively obscure, but it has been exacerbated when javac for release 21 and later starts generating such parameters in `MethodParameters` attribute. Since this is a problem with Java 8, I propose to backport this related fix onto 8 instead of changing latest releases.
> 
> This pull request contains a backport of commit [cba5bd26](https://github.com/openjdk/jdk/commit/cba5bd26387dc2ecb31ac8d6bea21bcc01da0cd5) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Eric McCorkle on 11 Nov 2014 and was reviewed by Coleen Phillimore and David Holmes.
> 
> A backport request is included in the latest comment in the original JBS issue.
> 
> An original pull request openjdk/jdk8u#63 was made against the wrong repository.

@liach 
Your change (at version abc21220fcd7c00f224041f70f6fd93c0ec7c196) is now ready to be sponsored by a Committer.

-------------

PR Comment: https://git.openjdk.org/jdk8u-dev/pull/592#issuecomment-2435757760


More information about the jdk8u-dev mailing list