From f0900b40bb762d5f24dfd27dbf22e80f981ac4ae Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 11 Apr 2016 19:53:46 +0200 Subject: [PATCH] Handle over the updated country instance to avoid NPE (countryId must be set) --- .../beans/country/PizzaAdminCountryWebApplicationBean.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebApplicationBean.java b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebApplicationBean.java index 2abe0aa1..17c2b3e2 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebApplicationBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebApplicationBean.java @@ -135,10 +135,10 @@ public class PizzaAdminCountryWebApplicationBean implements PizzaAdminCountryWeb try { // Send country to bean - this.countryBean.addCountry(country); + Country updatedCountry = this.countryBean.addCountry(country); // Fire event - this.addedCountryEvent.fire(new AdminEventCountryAdded(country)); + this.addedCountryEvent.fire(new AdminEventCountryAdded(updatedCountry)); // Clear bean this.clear(); -- 2.39.5