On Fri, 23 Jun 2023 07:44:31 GMT, Daohan Qu <d...@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