From: Roland Haeder Date: Wed, 13 Apr 2016 17:04:58 +0000 (+0200) Subject: Better return same object as other controllers may want to modify (add/change/delete... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1660515fc6d91b9933dd260ec22ba75bfb792e5e;p=pizzaservice-war.git Better return same object as other controllers may want to modify (add/change/delete) it. --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/shop/PizzaShopWebApplicationBean.java b/src/java/org/mxchange/pizzaapplication/beans/shop/PizzaShopWebApplicationBean.java index 1fbe8458..a502e025 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/shop/PizzaShopWebApplicationBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/shop/PizzaShopWebApplicationBean.java @@ -87,10 +87,10 @@ public class PizzaShopWebApplicationBean implements PizzaShopWebApplicationContr } @Override + @SuppressWarnings ("ReturnOfCollectionOrArrayField") public List getAllCategories () throws FacesException { // Return it - // TODO Find something better here to prevent warning - return Collections.unmodifiableList(this.categories); + return this.categories; } @Override