diff options
author | Simon Rettberg | 2021-04-19 13:01:44 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-04-19 13:01:44 +0200 |
commit | 0fbf491f949887db9a47b10a4528d041230e4925 (patch) | |
tree | 5d3fea0778be761851f72ee15a0ef682d9db1077 | |
parent | [api] Fix resetting wrong parent variable (diff) | |
download | taskman-lite-0fbf491f949887db9a47b10a4528d041230e4925.tar.gz taskman-lite-0fbf491f949887db9a47b10a4528d041230e4925.tar.xz taskman-lite-0fbf491f949887db9a47b10a4528d041230e4925.zip |
[api] Make env unmodifiable at assignment time
-rw-r--r-- | api/src/main/java/org/openslx/taskmanager/api/Environment.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/main/java/org/openslx/taskmanager/api/Environment.java b/api/src/main/java/org/openslx/taskmanager/api/Environment.java index 3942ec5..2a33a17 100644 --- a/api/src/main/java/org/openslx/taskmanager/api/Environment.java +++ b/api/src/main/java/org/openslx/taskmanager/api/Environment.java @@ -51,7 +51,7 @@ public class Environment bufferedReader.close(); - Environment.env = env; + Environment.env = Collections.unmodifiableMap( env ); log.info( "Loaded " + env.size() + " environment lines." ); } catch ( IOException e ) { log.info( "Could not load environment definition from " + fileName + ". Processes might use the same environment as this thread." ); @@ -62,7 +62,7 @@ public class Environment public static Map<String, String> get() { - return Collections.unmodifiableMap( env ); + return env; } } |