On Mon, 12 Aug 2024 07:31:09 GMT, Rafael Winterhalter 
<winterhal...@openjdk.org> wrote:

>> When a type uses a type variable without a declaration, no exception is 
>> thrown. This change triggers a `TypeNotFoundException` to be thrown.
>
> Rafael Winterhalter has refreshed the contents of this pull request, and 
> previous commits have been removed. The incremental views will show 
> differences compared to the previous content of the PR. The pull request 
> contains one new commit since the last revision:
> 
>   8337302: Undefined type variable results in null

test/jdk/java/lang/reflect/Generics/TestMissingTypeVariable.java line 54:

> 52:         Class<?> missing = ByteCodeLoader.load("sample.MissingVariable", 
> bytes);
> 53:         try {
> 54:             Type type = missing.getField("f").getGenericType();

Suggestion:

            Type type = missing.getDeclaredField("f").getGenericType();

This field is package-private, causing this test's failure.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20535#discussion_r1713823191

Reply via email to