Skip to content

Commit

Permalink
Merge pull request #124 from gdgib/G2-1549-UselessLambda
Browse files Browse the repository at this point in the history
G2-1549 Avoid unnecessary HDumbCommandConverter env lambda
  • Loading branch information
gdgib authored Mar 22, 2024
2 parents 8b43bea + 2cafdac commit 390ea0b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 390ea0b

Please sign in to comment.