chore: Bump version to 1.6.14 and add setValues method to AgentContext for improved context management

This commit is contained in:
extio-de
2025-09-23 17:52:25 +02:00
parent 103ff2cb40
commit 34ff8844a3
2 changed files with 10 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
<artifactId>lm-lib</artifactId> <artifactId>lm-lib</artifactId>
<groupId>de.extio</groupId> <groupId>de.extio</groupId>
<name>lm-lib</name> <name>lm-lib</name>
<version>1.6.13</version> <version>1.6.14</version>
<properties> <properties>
<java.version>21</java.version> <java.version>21</java.version>

View File

@@ -125,6 +125,15 @@ public final class AgentContext {
} }
} }
public <T> void setValues(final String key, final Collection<T> values) {
if (values == null) {
this.context.remove(key);
}
else {
this.context.put(key, List.copyOf(values));
}
}
public Map<String, List<? extends Object>> getContext() { public Map<String, List<? extends Object>> getContext() {
return this.context; return this.context;
} }