Skip to content

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Nov 12, 2025

Backport

This will backport the following commits from master to maven-4.0.x:

Questions ?

Please refer to the Backport tool documentation

…1425)

The previous implementation cached field accessibility state globally,
which could cause issues when the same field is accessed from different
contexts or security managers. This was particularly problematic in
plugin unit tests where fields would remain accessible after being set.

The fix ensures that field accessibility is properly restored to its
original state after setting field values, preventing accessibility
state from leaking between different bean instances.

Added unit tests to verify:
- Field accessibility is restored after setting values
- Multiple field accesses don't leak accessibility state
- The fix works correctly across different bean instances

This resolves the issue reported on the dev list regarding compiler
plugin unit test failures related to field accessibility.

(cherry picked from commit 6e30ae6)
@gnodet gnodet added bug Something isn't working backport mvn40 labels Nov 12, 2025
@gnodet gnodet added this to the 4.0.0 milestone Nov 13, 2025
@gnodet gnodet merged commit 2bfdc6c into apache:maven-4.0.x Nov 13, 2025
40 of 42 checks passed
@gnodet gnodet deleted the backport/maven-4.0.x/pr-11425 branch November 14, 2025 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bug Something isn't working mvn40

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant