create explicit copy of system properties (#7601) (#9653)

This commit is contained in:
Christian Schuster
2021-06-15 15:27:13 +02:00
committed by GitHub
parent ef3186f4a6
commit 5bbdc62ada

View File

@@ -34,7 +34,10 @@ public class GlobalSettings {
private static ThreadLocal<Properties> properties = new InheritableThreadLocal<Properties>() {
@Override
protected Properties initialValue() {
return (Properties) System.getProperties().clone();
// avoid using System.getProperties().clone() which is broken in Gradle - see https://github.com/gradle/gradle/issues/17344
Properties copy = new Properties();
copy.putAll(System.getProperties());
return copy;
};
};