-
Bug
-
Resolution: Unresolved
-
Critical
-
None
Originally discovered while fixing Illegal Reflective Access in EnvInject (CC jeffpearce).
There are many usages of the field: https://github.com/search?q=org%3Ajenkinsci+%22masterEnvVars%22&type=Code . In many cases the collection is modified, but there is no synchronization in the code. So there is a risk of Concurrent modification exceptions
I propose reworking the code, e.g. by introducing CopyOnWriteEnvVars or so which follows the same interface