X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftemplate%2FCollectionAccessor.java;h=8ce97adc3c0db8d2af4184bc69bd1c22e2f31ea9;hp=0771abd0ade85b2ada983363f29d167ad0fc3ee5;hb=179e7da4d8d8a474d0b622d60b5f5d32d6ab4052;hpb=c4ae226ec5052116cefc542ae2017036a7bc6332 diff --git a/src/main/java/net/pterodactylus/sone/template/CollectionAccessor.java b/src/main/java/net/pterodactylus/sone/template/CollectionAccessor.java index 0771abd..8ce97ad 100644 --- a/src/main/java/net/pterodactylus/sone/template/CollectionAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/CollectionAccessor.java @@ -1,5 +1,5 @@ /* - * Sone - CollectionAccessor.java - Copyright © 2010–2016 David Roden + * Sone - CollectionAccessor.java - Copyright © 2010–2019 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,8 +35,6 @@ import net.pterodactylus.util.template.TemplateContext; *
Returns the nice names of all {@link Sone}s in the collection, sorted * ascending by their nice names.
* - * - * @author David ‘Bombe’ Roden */ public class CollectionAccessor extends ReflectionAccessor { @@ -47,7 +45,7 @@ public class CollectionAccessor extends ReflectionAccessor { public Object get(TemplateContext templateContext, Object object, String member) { Collection collection = (Collection) object; if (member.equals("soneNames")) { - List sones = new ArrayList(); + List sones = new ArrayList<>(); for (Object sone : collection) { if (!(sone instanceof Sone)) { continue;