From aabad2347aaf52e225541cb954e98ab509e9aa2f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 1 Mar 2019 19:17:40 +0300 Subject: Tags refactoring --- .../com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/mitchellbosecke/pebble') diff --git a/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java b/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java index c7b00ea3..c83c3a45 100644 --- a/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java +++ b/src/main/java/com/mitchellbosecke/pebble/extension/filters/TagsListFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2017, Juick + * Copyright (C) 2008-2019, Juick * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -22,6 +22,7 @@ import com.mitchellbosecke.pebble.extension.Filter; import com.mitchellbosecke.pebble.template.EvaluationContext; import com.mitchellbosecke.pebble.template.PebbleTemplate; +import java.util.Collection; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -33,7 +34,7 @@ public class TagsListFilter implements Filter { @SuppressWarnings("unchecked") @Override public Object apply(Object input, Map args, PebbleTemplate self, EvaluationContext context, int lineNumber) { - return ((List) input).stream().map(Tag::getName).collect(Collectors.toList()); + return ((Collection) input).stream().map(Tag::getName).collect(Collectors.toList()); } @Override -- cgit v1.2.3