From: David ‘Bombe’ Roden Date: Wed, 13 Oct 2010 14:21:03 +0000 (+0200) Subject: Rename “localSones” method to a more traditional “getSones”. X-Git-Tag: 0.1-RC1~463 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fcd011a16b119966906b3137513e9432ab86c3a8;p=Sone.git Rename “localSones” method to a more traditional “getSones”. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 31e2680..7ddc247 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -95,7 +95,7 @@ public class Core extends AbstractService { * * @return The local Sones */ - public Set localSones() { + public Set getSones() { return Collections.unmodifiableSet(localSones); } diff --git a/src/main/java/net/pterodactylus/sone/web/LoginPage.java b/src/main/java/net/pterodactylus/sone/web/LoginPage.java index a72fd02..39c3cdc 100644 --- a/src/main/java/net/pterodactylus/sone/web/LoginPage.java +++ b/src/main/java/net/pterodactylus/sone/web/LoginPage.java @@ -53,12 +53,12 @@ public class LoginPage extends SoneTemplatePage { @Override protected void processTemplate(Request request, Template template) throws RedirectException { super.processTemplate(request, template); - Set localSones = webInterface.core().localSones(); + Set 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; diff --git a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java index c271024..6afc3b7 100644 --- a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java @@ -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; }