From fb1a08f9d80e5e10de4155e8ba720366a9fedd52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Wed, 27 Mar 2024 17:23:19 +0100 Subject: [PATCH] do not auto-configure path event directory --- .../java/org/xbib/event/path/PathEventManagerService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/event-common/src/main/java/org/xbib/event/path/PathEventManagerService.java b/event-common/src/main/java/org/xbib/event/path/PathEventManagerService.java index a97d8c2..3b72ffa 100644 --- a/event-common/src/main/java/org/xbib/event/path/PathEventManagerService.java +++ b/event-common/src/main/java/org/xbib/event/path/PathEventManagerService.java @@ -18,6 +18,7 @@ import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.logging.Level; @@ -49,7 +50,8 @@ public class PathEventManagerService extends AbstractEventManagerService impleme String name = entry.getKey(); Settings definition = entry.getValue(); if (definition.getAsBoolean("enabled", true)) { - Path path = Paths.get(definition.get("path", "/var/tmp/" + name)); + String pathName = Objects.requireNonNull(definition.get("path"), "path must not be null"); + Path path = Paths.get(pathName); TimeValue lifetime = definition.getAsTime("lifetime", TimeValue.timeValueHours(72)); String eventType = definition.get("type", "path"); createQueue(name, path);