From: Roland Haeder Date: Sat, 5 Sep 2015 21:51:57 +0000 (+0200) Subject: cleanup of old exceptions from TDGP days. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6b990c93ddd91ec8bfdd03283e6af111595c9ed4;p=pizzaservice-war.git cleanup of old exceptions from TDGP days. Signed-off-by:Roland Häder --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceWebBean.java index 41f61484..06465f62 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceWebBean.java @@ -17,7 +17,6 @@ package org.mxchange.pizzaapplication.beans.controller; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; import java.rmi.RemoteException; import java.sql.SQLException; import java.util.Deque; @@ -92,7 +91,7 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe public Iterator getAvailableProductsIterator () throws RemoteException { try { return this.remote.getAvailableProductsIterator(); - } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + } catch (final IOException | SQLException ex) { // Continue to throw throw new RemoteException("getAvailableProductsIterator() failed", ex); } @@ -102,7 +101,7 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe public Iterator getAllProductsIterator () throws RemoteException { try { return this.remote.getAllProductsIterator(); - } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + } catch (final IOException | SQLException ex) { // Continue to throw throw new RemoteException("getAllProductsIterator() failed.", ex); } @@ -112,7 +111,7 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe public Deque getAvailableProducts () throws RemoteException { try { return this.remote.getAvailableProducts(); - } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + } catch (final IOException | SQLException ex) { // Continue to throw throw new RemoteException("getAvailableProducts() failed.", ex); } @@ -122,7 +121,7 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe public Deque getAllProducts () throws RemoteException { try { return this.remote.getAllProducts(); - } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + } catch (final IOException | SQLException ex) { // Continue to throw throw new RemoteException("getAllProducts() failed", ex); } @@ -132,7 +131,7 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe public Iterator getAllCategoriesIterator () throws RemoteException { try { return this.remote.getAllCategoriesIterator(); - } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + } catch (final IOException | SQLException ex) { // Continue to throw throw new RemoteException("getAllCategoriesIterator() failed.", ex); } @@ -142,27 +141,27 @@ public class PizzaServiceWebBean extends BaseFrameworkBean implements PizzaWebBe public Deque getAllCategories () throws RemoteException { try { return this.remote.getAllCategories(); - } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + } catch (final IOException | SQLException ex) { // Continue to throw throw new RemoteException("getAllCategories() failed.", ex); } } @Override - public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException { + public void doAdminAddCategory (final Category category) throws RemoteException { try { this.remote.doAdminAddCategory(category); - } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + } catch (final IOException | SQLException | CategoryTitleAlreadyUsedException ex) { // Continue to throw throw new RemoteException("doAdminAddCategory() failed.", ex); } } @Override - public void doAdminAddProduct (final Product product) throws RemoteException, ProductTitleAlreadyUsedException { + public void doAdminAddProduct (final Product product) throws RemoteException { try { this.remote.doAdminAddProduct(product); - } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + } catch (final IOException | SQLException | ProductTitleAlreadyUsedException ex) { // Continue to throw throw new RemoteException("doAdminAddProduct() failed.", ex); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java index 451f9f70..02c3f5ee 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaWebBean.java @@ -20,8 +20,6 @@ import java.rmi.RemoteException; import java.util.Deque; import java.util.Iterator; import org.mxchange.jcoreee.beans.FrameworkBean; -import org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException; -import org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException; import org.mxchange.jshopcore.model.category.Category; import org.mxchange.jshopcore.model.product.Product; @@ -84,16 +82,14 @@ public interface PizzaWebBean extends FrameworkBean { * * @param category Category instance * @throws java.rmi.RemoteException If something unexpected happened - * @throws org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException If the given title is already used */ - public void doAdminAddCategory (final Category category) throws RemoteException, CategoryTitleAlreadyUsedException; + public void doAdminAddCategory (final Category category) throws RemoteException; /** * Adds given product data from request to database * * @param product Product instance * @throws java.rmi.RemoteException If something unexpected happened - * @throws org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException If the given product title is already used */ - public void doAdminAddProduct (final Product product) throws RemoteException, ProductTitleAlreadyUsedException; + public void doAdminAddProduct (final Product product) throws RemoteException; }