From d3acaaf075a10466536b9038a504052c87f1eb5f Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 10 Jun 2024 18:36:31 +0200 Subject: [PATCH] Fix crash handler content processing code --- .../staropensource/sosengine/base/logging/CrashHandler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java b/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java index 78b4e14..7397f3e 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java +++ b/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java @@ -184,7 +184,11 @@ public final class CrashHandler { if (!content.isEmpty()) content.append("\n"); - if (map.get(key) instanceof String) { + if (map.get(key) == null) { + if (indentationSize == 0) content.append("\n"); + else content.append(" ".repeat(indentationSize)).append("-> "); + content.append(key); + } else if (map.get(key) instanceof String) { if (indentationSize == 0) content.append("\n"); else content.append(" ".repeat(indentationSize)).append("-> "); content.append(key).append(": ").append(map.get(key));