Use more convenient method from core.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 6 Nov 2010 11:09:21 +0000 (12:09 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 6 Nov 2010 11:09:21 +0000 (12:09 +0100)
src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java

index 065950e..2953b0d 100644 (file)
@@ -137,12 +137,7 @@ public class SoneTemplatePage extends TemplatePage {
                if (soneId == null) {
                        return null;
                }
-               for (Sone sone : webInterface.getCore().getSones()) {
-                       if (sone.getId().equals(soneId)) {
-                               return sone;
-                       }
-               }
-               return null;
+               return webInterface.getCore().getLocalSone(soneId);
        }
 
        /**