From: Roland Haeder Date: Mon, 11 Apr 2016 17:53:46 +0000 (+0200) Subject: Handle over the updated country instance to avoid NPE (countryId must be set) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=509ffb3b5ece3032288f7ad68425bd6b1690dec3;p=addressbook-war.git Handle over the updated country instance to avoid NPE (countryId must be set) --- diff --git a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationBean.java index dc3e0854..a7cec156 100644 --- a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationBean.java @@ -135,10 +135,10 @@ public class AddressbookAdminCountryWebApplicationBean implements AddressbookAdm 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();