From 2cafdac32240d8c6bf73446fe36e21fd57bcc983 Mon Sep 17 00:00:00 2001 From: Greg Gibeling Date: Thu, 21 Mar 2024 16:50:44 -0700 Subject: [PATCH] G2-1549 Avoid unnecessary HDumbCommandConverter env lambda --- .../gearbox/command/converter/dumb/HDumbCommandConverter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gb-command/src/main/java/com/g2forge/gearbox/command/converter/dumb/HDumbCommandConverter.java b/gb-command/src/main/java/com/g2forge/gearbox/command/converter/dumb/HDumbCommandConverter.java index e7aeccd..f35531d 100644 --- a/gb-command/src/main/java/com/g2forge/gearbox/command/converter/dumb/HDumbCommandConverter.java +++ b/gb-command/src/main/java/com/g2forge/gearbox/command/converter/dumb/HDumbCommandConverter.java @@ -3,6 +3,7 @@ import java.util.List; import com.g2forge.alexandria.command.invocation.CommandInvocation.CommandInvocationBuilder; +import com.g2forge.alexandria.command.invocation.environment.modified.EnvironmentValue; import com.g2forge.alexandria.java.core.helpers.HCollection; import com.g2forge.gearbox.command.converter.IMethodArgument; import com.g2forge.gearbox.command.converter.dumb.DumbCommandConverter.ArgumentContext; @@ -43,7 +44,7 @@ public static void set(ArgumentContext argumentContext, IMethodArgument argum final Environment environment = metadata.get(Environment.class); if (environment != null) { // Null environment values, do nothing - if (value != null) argumentContext.getEnvironment().modifier(environment.value(), prior -> value); + if (value != null) argumentContext.getEnvironment().modifier(environment.value(), new EnvironmentValue(value)); return; }