summaryrefslogtreecommitdiffstats
path: root/api/src
diff options
context:
space:
mode:
authorSimon Rettberg2021-04-19 13:01:44 +0200
committerSimon Rettberg2021-04-19 13:01:44 +0200
commit0fbf491f949887db9a47b10a4528d041230e4925 (patch)
tree5d3fea0778be761851f72ee15a0ef682d9db1077 /api/src
parent[api] Fix resetting wrong parent variable (diff)
downloadtaskman-lite-0fbf491f949887db9a47b10a4528d041230e4925.tar.gz
taskman-lite-0fbf491f949887db9a47b10a4528d041230e4925.tar.xz
taskman-lite-0fbf491f949887db9a47b10a4528d041230e4925.zip
[api] Make env unmodifiable at assignment time
Diffstat (limited to 'api/src')
-rw-r--r--api/src/main/java/org/openslx/taskmanager/api/Environment.java4
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;
}
}