Refactoring

pull/215/head
M66B 9 months ago
parent 726ea077ff
commit d337763a77

@ -647,15 +647,15 @@ public class EntityRule {
@Override @Override
public EvaluationValue evaluate( public EvaluationValue evaluate(
Expression expression, Token functionToken, EvaluationValue... parameterValues) { Expression expression, Token functionToken, EvaluationValue... parameterValues) {
List<String> result = new ArrayList<>();
String name = parameterValues[0].getStringValue(); String name = parameterValues[0].getStringValue();
if (name != null && headers != null) {
List<String> result = new ArrayList<>();
if (headers != null)
for (Header header : headers) for (Header header : headers)
if (name.equalsIgnoreCase(header.getName())) if (name.equalsIgnoreCase(header.getName()))
result.add(header.getValue()); result.add(header.getValue());
Log.i("EXPR " + name + "=" + TextUtils.join(", ", result)); Log.i("EXPR " + name + "=" + TextUtils.join(", ", result));
}
return new EvaluationValue(result, ExpressionConfiguration.defaultConfiguration()); return new EvaluationValue(result, ExpressionConfiguration.defaultConfiguration());
} }

Loading…
Cancel
Save