From 3f0540021a73ab1c54448e267c5088a00cc47bd4 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 17 Apr 2024 20:56:24 -0700 Subject: Remove default properties support --- src/main/java/org/traccar/config/Config.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/main/java/org/traccar/config') 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")); -- cgit v1.2.3