]> git.mxchange.org Git - pizzaservice-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:53:46 +0000 (19:53 +0200)
src/java/org/mxchange/pizzaapplication/beans/country/PizzaAdminCountryWebApplicationBean.java

index 2abe0aa1bd87cbc63976f08761401ca55a7e0a7d..17c2b3e2f1773d38427297fb55b37da440b0bfef 100644 (file)
@@ -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();