From f68baf994f14c182cbffb85272d6a7486887d8f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 24 Aug 2016 10:52:00 +0200 Subject: [PATCH] Please cherry-pick: - got rid of redundant hasFoos() as #{ no someController.allFoos().isEmpty()} works fine - renamed controller method allMobileProvider() -> allMobileProviders() --- .../JobsAdminMobileProviderWebRequestBean.java | 2 +- .../JobsMobileProviderWebRequestBean.java | 11 +++-------- .../JobsMobileProviderWebRequestController.java | 9 +-------- .../admin/contact/admin_form_contact_data.tpl | 2 +- .../templates/admin/mobile/admin_form_mobile_data.tpl | 2 +- web/WEB-INF/templates/contact/form_contact_data.tpl | 2 +- .../templates/input_fields/mobile_input_fields.tpl | 2 +- .../mobile_provider/admin_mobile_provider_list.xhtml | 2 +- 8 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java index bbb2405f..3b8b6dff 100644 --- a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java @@ -189,7 +189,7 @@ public class JobsAdminMobileProviderWebRequestBean extends BaseJobsController im boolean isFound = false; // Get list of all providers - List providers = this.mobileController.allMobileProvider(); + List providers = this.mobileController.allMobileProviders(); // Get iterator from it Iterator iterator = providers.iterator(); diff --git a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java index 823f8500..bfc56903 100644 --- a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java @@ -17,7 +17,6 @@ package org.mxchange.jjobs.beans.mobileprovider; import java.text.MessageFormat; -import java.util.Collections; import java.util.List; import javax.annotation.PostConstruct; import javax.enterprise.context.SessionScoped; @@ -95,13 +94,9 @@ public class JobsMobileProviderWebRequestBean extends BaseJobsController impleme } @Override - public List allMobileProvider () { - return Collections.unmodifiableList(this.mobileProviders); - } - - @Override - public boolean hasMobileProvider () { - return (!this.mobileProviders.isEmpty()); + @SuppressWarnings ("ReturnOfCollectionOrArrayField") + public List allMobileProviders () { + return this.mobileProviders; } /** diff --git a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestController.java b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestController.java index fe8d8330..2b7d6974 100644 --- a/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestController.java +++ b/src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestController.java @@ -33,14 +33,7 @@ public interface JobsMobileProviderWebRequestController extends Serializable { *

* @return A list of all mobile providers */ - List allMobileProvider (); - - /** - * Checks whether mobile providers are registered - *

- * @return Whether mobile providers are registered - */ - boolean hasMobileProvider (); + List allMobileProviders (); /** * Observes events being fired after the administrator has added a new diff --git a/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl b/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl index fec0539c..adb1845d 100644 --- a/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl +++ b/web/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl @@ -237,7 +237,7 @@ - + diff --git a/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl b/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl index d6533f3d..742cc4a2 100644 --- a/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl +++ b/web/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl @@ -34,7 +34,7 @@ - + diff --git a/web/WEB-INF/templates/contact/form_contact_data.tpl b/web/WEB-INF/templates/contact/form_contact_data.tpl index ab13d057..af42442f 100644 --- a/web/WEB-INF/templates/contact/form_contact_data.tpl +++ b/web/WEB-INF/templates/contact/form_contact_data.tpl @@ -269,7 +269,7 @@ - + diff --git a/web/WEB-INF/templates/input_fields/mobile_input_fields.tpl b/web/WEB-INF/templates/input_fields/mobile_input_fields.tpl index 02d81bd4..8307a100 100644 --- a/web/WEB-INF/templates/input_fields/mobile_input_fields.tpl +++ b/web/WEB-INF/templates/input_fields/mobile_input_fields.tpl @@ -9,7 +9,7 @@ - + diff --git a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml index 345957e2..6593d0d7 100644 --- a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml +++ b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml @@ -17,7 +17,7 @@ - + -- 2.39.5