On Tue, 28 Oct 2025 18:31:08 GMT, Chen Liang <[email protected]> wrote:

>> java.lang.reflect.Proxy has some surprising behaviors associated with 
>> protected methods in Object, covariant/contravariant overrides in 
>> interfaces, and package-private types in method signatures. Such behaviors 
>> should have tests, so that they are not accidentally perturbed in Proxy 
>> updates.
>
> Chen Liang has updated the pull request with a new target base due to a merge 
> or a rebase. The incremental webrev excludes the unrelated changes brought in 
> by the merge/rebase. The pull request contains three additional commits since 
> the last revision:
> 
>  - Merge branch 'master' of https://github.com/openjdk/jdk into 
> test/proxy-dispatches
>  - Tweaks
>  - 8370839: Tests to verify peculiar Proxy dispatching behaviors

These look good, but I think it would help if you could add a short description 
(in a comment) for each/some test cases of what it is that you're trying to 
test. Especially since some of the test cases are targeting the invisible 
bridge methods.

test/jdk/java/lang/reflect/Proxy/BridgeMethodsTest.java line 49:

> 47:     }
> 48: 
> 49:     // Does not duplicate with Object::clone so it is not proxied

Redundant comment?

test/jdk/java/lang/reflect/Proxy/NonPublicSignaturesTest.java line 72:

> 70:         instance.call();
> 71:         // checkcast fails - proxy class cannot access the return type
> 72:         returnValue.set(Internal.INSTANCE);

Where is this 'checkcast' happening exactly?

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

PR Review: https://git.openjdk.org/jdk/pull/28023#pullrequestreview-3416891103
PR Review Comment: https://git.openjdk.org/jdk/pull/28023#discussion_r2490826618
PR Review Comment: https://git.openjdk.org/jdk/pull/28023#discussion_r2490846156

Reply via email to