Simplify list notification
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 3 Mar 2016 11:20:43 +0000 (12:20 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Thu, 3 Mar 2016 11:20:43 +0000 (12:20 +0100)
src/main/java/net/pterodactylus/sone/notify/ListNotification.java

index 101b1fb..6911371 100644 (file)
@@ -194,15 +194,7 @@ public class ListNotification<T> extends TemplateNotification {
                if (!key.equals(listNotification.key)) {
                        return false;
                }
-               if (elements.size() != listNotification.elements.size()) {
-                       return false;
-               }
-               for (int index = 0; index < elements.size(); ++index) {
-                       if (!elements.get(index).equals(listNotification.elements.get(index))) {
-                               return false;
-                       }
-               }
-               return true;
+               return elements.equals(listNotification.elements);
        }
 
 }