diff --git a/src/main/java/com/hubspot/jinjava/lib/filter/DateTimeFormatFilter.java b/src/main/java/com/hubspot/jinjava/lib/filter/DateTimeFormatFilter.java index 68040d553..b1f9c7c75 100644 --- a/src/main/java/com/hubspot/jinjava/lib/filter/DateTimeFormatFilter.java +++ b/src/main/java/com/hubspot/jinjava/lib/filter/DateTimeFormatFilter.java @@ -33,13 +33,9 @@ public String getName() { public Object filter(Object var, JinjavaInterpreter interpreter, Object... args) { - List 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) {