Withdrawn: 8307512: Provide more information in message of NoSuchFieldException thrown by Class
Daohan Qu
dqu at openjdk.org
Fri Jul 14 11:13:21 UTC 2023
On Fri, 23 Jun 2023 07:44:31 GMT, Daohan Qu <dqu at openjdk.org> wrote:
> Similar to #11745 , this patch adds more information for `NoSuchFieldException` thrown by `getField()` or `getDeclaredField()` of `java.lang.Class`. The error message changes like the example below:
> 1. For `getField()`
>
> Before this change:
>
> Exception in thread "main" java.lang.NoSuchFieldException: i
> …
>
> After this change:
>
> Exception in thread "main" java.lang.NoSuchFieldException: Class 'Test' does not have member field 'i'
> …
>
>
> 2. For `getDeclaredField()`
>
> Before this change:
>
> Exception in thread "main" java.lang.NoSuchFieldException: i
> …
>
> After this change:
>
> Exception in thread "main" java.lang.NoSuchFieldException: Class 'Test' does not have declared field 'i'
> …
>
>
> Tests `tier1-3` has passed for release build on Linux x86-64. (With one failure not related to this.)
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.org/jdk/pull/14624
More information about the core-libs-dev
mailing list