JDK-8020981: Update methods of java.lang.reflect.Parameter to throw correct exceptions

Eric McCorkle eric.mccorkle at oracle.com
Fri Sep 13 19:28:57 UTC 2013

On 09/13/13 09:53, Paul Benedict wrote:
> MalformedParametersException should receive a @since tag.
> Additionally, the javadoc doesn't describe what it means for a parameter to
> be malformed. The answer doesn't need to be exhaustive, but I think some
> examples would help developers if they catch one and need to dig into class
> files. Or if there's a reference point to the JLS, that would be good too.
> Here's a good sample from Eric:
> http://mail.openjdk.java.net/pipermail/enhanced-metadata-spec-discuss/2013-August/000242.html

I updated the javadoc comments with a list taken from my earlier email
you referenced, and I added more comments to MalformedParametersException.

> PS: I think the consistent exception hierarchy for reflective operations
> should remain in tact. Although it's annoying checked exceptions exist, my
> preference would be to extend from ReflectiveOperationException rather than
> RuntimeException.

If you have spec issues, please take them up on
enhanced-metadata-discuss.  I am not the spec owner.

More information about the core-libs-dev mailing list