Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.getProperties should return the last value set by setProperties #28924

Open
mlopatkin opened this issue Apr 23, 2024 · 0 comments
Open
Labels
a:bug in:configuration-cache Configuration Caching

Comments

@mlopatkin
Copy link
Member

Current implementation of the JVM doesn't do defensive copying when setting system properties wholesale. The provided Properties instance is stored. The instrumented Gradle functions do not follow this, which can lead to subtle behavior differences.

Note, that there is no need to have a finer-grained tracking of the property reads after setting the properties for the configuration cache purposes, because it is not possible to affect them externally anyway. We still need to capture them tat the end of the configuration phase o be able to restore them when reusing the cache.

@mlopatkin mlopatkin added a:bug in:configuration-cache Configuration Caching and removed to-triage labels Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug in:configuration-cache Configuration Caching
Projects
None yet
Development

No branches or pull requests

1 participant