aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-04-17 20:56:24 -0700
committerAnton Tananaev <anton@traccar.org>2024-04-17 20:56:24 -0700
commit3f0540021a73ab1c54448e267c5088a00cc47bd4 (patch)
tree7ea46b04db98de4b4fb17f88a397e384957b5865 /src/main/java/org/traccar
parent93c4e0ef2f882c4818b542b7792e9b02975f9da7 (diff)
downloadtrackermap-server-3f0540021a73ab1c54448e267c5088a00cc47bd4.tar.gz
trackermap-server-3f0540021a73ab1c54448e267c5088a00cc47bd4.tar.bz2
trackermap-server-3f0540021a73ab1c54448e267c5088a00cc47bd4.zip
Remove default properties support
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/config/Config.java14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/main/java/org/traccar/config/Config.java b/src/main/java/org/traccar/config/Config.java
index 47e1f0707..409a3f16a 100644
--- a/src/main/java/org/traccar/config/Config.java
+++ b/src/main/java/org/traccar/config/Config.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2022 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2024 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,20 +41,10 @@ public class Config {
@Inject
public Config(@Named("configFile") String file) throws IOException {
try {
- Properties mainProperties = new Properties();
try (InputStream inputStream = new FileInputStream(file)) {
- mainProperties.loadFromXML(inputStream);
+ properties.loadFromXML(inputStream);
}
- String defaultConfigFile = mainProperties.getProperty("config.default");
- if (defaultConfigFile != null) {
- try (InputStream inputStream = new FileInputStream(defaultConfigFile)) {
- properties.loadFromXML(inputStream);
- }
- }
-
- properties.putAll(mainProperties); // override defaults
-
useEnvironmentVariables = Boolean.parseBoolean(System.getenv("CONFIG_USE_ENVIRONMENT_VARIABLES"))
|| Boolean.parseBoolean(properties.getProperty("config.useEnvironmentVariables"));