RFR: JDK-8277451: java.lang.reflect.Field::set on static field with invalid argument type should throw IAE

Alan Bateman alanb at openjdk.java.net
Sun Nov 21 21:08:08 UTC 2021


On Sun, 21 Nov 2021 03:02:53 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

> Hello Mandy,
> With this change the `getMessage` may get passed an empty string, so it would end up printing something like `Can not get ... field <fieldname> on`. Do you think the `getMessage` implementation should be tweaked not to print the "on" if the `attemptedType` is empty?

I suspect this was meant to be "null" rather than "".

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

PR: https://git.openjdk.java.net/jdk/pull/6490


More information about the core-libs-dev mailing list