]> git.mxchange.org Git - addressbook-war.git/commitdiff
Handle over the updated country instance to avoid NPE (countryId must be set)
authorRoland Haeder <roland@mxchange.org>
Mon, 11 Apr 2016 17:53:46 +0000 (19:53 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 11 Apr 2016 17:54:06 +0000 (19:54 +0200)
src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebApplicationBean.java

index dc3e0854b233cb6ddd320acb14158ab6b2e15681..a7cec156ada89ad926e7b45e206339d40889a20b 100644 (file)
@@ -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();