fix: Update setStringValue method to handle null values by removing the key from context

This commit is contained in:
extio-de
2025-10-13 21:20:18 +02:00
parent b31ddda715
commit 1ba9227311

View File

@@ -89,7 +89,11 @@ public final class AgentContext {
} }
public void setStringValue(final String key, final String value) { public void setStringValue(final String key, final String value) {
this.context.put(key, List.of(value)); if (value == null) {
this.context.remove(key);
} else {
this.context.put(key, List.of(value));
}
} }
public List<String> getStringValues(final String key) { public List<String> getStringValues(final String key) {