From 6b990c93ddd91ec8bfdd03283e6af111595c9ed4 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 5 Sep 2015 23:51:57 +0200 Subject: [PATCH] =?utf8?q?cleanup=20of=20old=20exceptions=20from=20TDGP=20?= =?utf8?q?days.=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../beans/controller/PizzaServiceWebBean.java | 21 +++++++++---------- .../beans/controller/PizzaWebBean.java | 8 ++----- 2 files changed, 12 insertions(+), 17 deletions(-) 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; } -- 2.39.5