Rename “localSones” method to a more traditional “getSones”.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 14:21:03 +0000 (16:21 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 14:21:03 +0000 (16:21 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java
src/main/java/net/pterodactylus/sone/web/LoginPage.java
src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java

index 31e2680..7ddc247 100644 (file)
@@ -95,7 +95,7 @@ public class Core extends AbstractService {
         *
         * @return The local Sones
         */
-       public Set<Sone> localSones() {
+       public Set<Sone> getSones() {
                return Collections.unmodifiableSet(localSones);
        }
 
index a72fd02..39c3cdc 100644 (file)
@@ -53,12 +53,12 @@ public class LoginPage extends SoneTemplatePage {
        @Override
        protected void processTemplate(Request request, Template template) throws RedirectException {
                super.processTemplate(request, template);
-               Set<Sone> localSones = webInterface.core().localSones();
+               Set<Sone> localSones = webInterface.core().getSones();
                template.set("sones", localSones);
                if (request.getMethod() == Method.POST) {
                        String soneId = request.getHttpRequest().getPartAsStringFailsafe("sone-id", 100);
                        Sone selectedSone = null;
-                       for (Sone sone : webInterface.core().localSones()) {
+                       for (Sone sone : webInterface.core().getSones()) {
                                if (sone.getId().equals(soneId)) {
                                        selectedSone = sone;
                                        break;
index c271024..6afc3b7 100644 (file)
@@ -111,7 +111,7 @@ public class SoneTemplatePage extends TemplatePage {
                        return null;
                }
                String soneId = (String) session.getAttribute("Sone.CurrentSone");
-               for (Sone sone : webInterface.core().localSones()) {
+               for (Sone sone : webInterface.core().getSones()) {
                        if (sone.getId().equals(soneId)) {
                                return sone;
                        }