Skip to content

Avoid opening unannotated methods during parameter discovery - #618

Open
JimmyLiuJia wants to merge 1 commit into
cbeust:masterfrom
JimmyLiuJia:fix/annotated-method-access
Open

JimmyLiuJia wants to merge 1 commit into
cbeust:masterfrom
JimmyLiuJia:fix/annotated-method-access

Conversation

@JimmyLiuJia

Copy link
Copy Markdown

Discovering options on a @ParametersDelegate implementing BiPredicate attempts to open unannotated private methods in java.util.function and fails with InaccessibleObjectException.

Only change method accessibility after finding @Parameter, @DynamicParameter or @ParametersDelegate. Add a regression that parses a private delegate field and a private annotated setter on a BiPredicate implementation; it fails with the reported exception before the fix.

Validation: clean check assemble passed with 339 tests, zero failures, errors or skips on Windows with Temurin 25.0.4.1 and Gradle 9.8.0. Local validation used installed Gradle 9.8.0; the repository wrapper specifies 9.7.1.

Fixes #582

AI assistance: OpenAI Codex wrote the fix and regression test, ran validation, and drafted this PR.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@ParametersDelegate fails if delegate class implements BiPredicate

1 participant