From 42b06aa5562516901eeb284781d642b7d4a8aef2 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Wed, 14 Jan 2026 14:12:28 +0100 Subject: [PATCH] Switch to JSON as config format Java Properties require ISO 8859-1 character encoding, leading to manual edits of file. --- .../launcher/AdminPropertiesSetter.java | 50 +++++++++++-------- .../org/cryptomator/launcher/BufferedLog.java | 28 +++++++++++ .../org/cryptomator/launcher/Cryptomator.java | 4 +- 3 files changed, 59 insertions(+), 23 deletions(-) create mode 100644 src/main/java/org/cryptomator/launcher/BufferedLog.java diff --git a/src/main/java/org/cryptomator/launcher/AdminPropertiesSetter.java b/src/main/java/org/cryptomator/launcher/AdminPropertiesSetter.java index 9ba18fa8c..061590e6b 100644 --- a/src/main/java/org/cryptomator/launcher/AdminPropertiesSetter.java +++ b/src/main/java/org/cryptomator/launcher/AdminPropertiesSetter.java @@ -1,21 +1,24 @@ package org.cryptomator.launcher; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.json.JsonMapper; import org.apache.commons.lang3.SystemUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.io.IOException; import java.nio.file.Files; import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.nio.file.StandardOpenOption; +import java.util.List; +import java.util.Map; import java.util.Properties; import java.util.Set; /** * Class to overwrite system properties with an external properties file *

- * To overwrite system properties, the method {@link #adjustSystemProperties()} loads the properties file {@value PROP_FILENAME} from an OS-dependent location and add all supported properties to the {@link System} properties. + * To overwrite system properties, the method {@link #adjustSystemProperties()} loads the JSON file {@value CONFIG_NAME} from an OS-dependent location and add all supported properties to the {@link System} properties. * The predefined location are: *