Skip to content

Commit

Permalink
Removes stringArgs from DateTimeFormatFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
gabru-md committed Jan 16, 2020
1 parent 7abb0cc commit ea62429
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.hubspot.jinjava.lib.filter;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import com.hubspot.jinjava.doc.annotations.JinjavaDoc;
Expand Down Expand Up @@ -33,13 +31,9 @@ public String getName() {
public Object filter(Object var, JinjavaInterpreter interpreter,
Object... args) {

List<String> stringArgs = new ArrayList<>();
for (Object arg: args) {
stringArgs.add(Objects.toString(arg));
}
String[] filterArgs = new String[stringArgs.size()];
String[] filterArgs = new String[args.length];
for (int i = 0; i < filterArgs.length; i++) {
filterArgs[i] = stringArgs.get(i);
filterArgs[i] = Objects.toString(args[i]);
}

if (args.length > 0) {
Expand Down

0 comments on commit ea62429

Please sign in to comment.