diff --git a/src/main/java/org/cryptomator/launcher/AdminPropertiesSetter.java b/src/main/java/org/cryptomator/launcher/AdminPropertiesSetter.java index 30dcd241d..36c7dd247 100644 --- a/src/main/java/org/cryptomator/launcher/AdminPropertiesSetter.java +++ b/src/main/java/org/cryptomator/launcher/AdminPropertiesSetter.java @@ -95,9 +95,10 @@ class AdminPropertiesSetter { private static Map loadAdminProperties(Path adminPropertiesPath) { try (var in = Files.newInputStream(adminPropertiesPath, StandardOpenOption.READ)) { var map = JSON.readValue(in, new TypeReference>() {}); - if (map != null) { - return map; + if (map == null) { + throw new NullPointerException("JSON parsing returned null"); } + return map; } catch (NoSuchFileException _) { //NO-OP log("No admin properties found at {}.", List.of(adminPropertiesPath));