Remove irrelevant code, the object will never be null.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 2 Nov 2014 10:33:46 +0000 (11:33 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 2 Nov 2014 10:33:46 +0000 (11:33 +0100)
src/main/java/net/pterodactylus/sone/template/CollectionAccessor.java

index 12b4bc2..b5a4255 100644 (file)
@@ -45,9 +45,6 @@ public class CollectionAccessor extends ReflectionAccessor {
         */
        @Override
        public Object get(TemplateContext templateContext, Object object, String member) {
-               if (object == null) {
-                       return null;
-               }
                Collection<?> collection = (Collection<?>) object;
                if (member.equals("soneNames")) {
                        List<Sone> sones = new ArrayList<Sone>();