]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Compare against null
authorRoland Haeder <roland@mxchange.org>
Mon, 12 Oct 2015 15:40:33 +0000 (17:40 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 12 Oct 2015 15:40:33 +0000 (17:40 +0200)
src/java/org/mxchange/addressbook/beans/user/UserWebBean.java

index 0ff385cc01015e12d47ebd295a0698abbdeb579f..c9467c045e25f55b313622ed224933afa1071775 100644 (file)
@@ -328,7 +328,7 @@ public class UserWebBean implements UserWebController {
                contact.setContactEmailAddress(this.getEmailAddress());
 
                // Don't set null or wrong references
-               if ((phone instanceof DialableLandLineNumber) && (phone.getPhoneCountry() instanceof Country) && (this.getPhoneAreaCode() > 0) &&(this.getPhoneNumber() > 0)) {
+               if ((phone instanceof DialableLandLineNumber) && (phone.getPhoneCountry() instanceof Country) && (this.getPhoneAreaCode() != null) && (this.getPhoneNumber() != null) && (this.getPhoneAreaCode() > 0) &&(this.getPhoneNumber() > 0)) {
                        // Now the number must be given
                        if (phone.getPhoneAreaCode() == null) {
                                // Is null
@@ -349,7 +349,7 @@ public class UserWebBean implements UserWebController {
                }
 
                // Don't set null or wrong references
-               if ((fax instanceof DialableFaxNumber) && (fax.getPhoneCountry() instanceof Country) && (this.getFaxAreaCode() > 0) && (this.getFaxNumber() > 0)) {
+               if ((fax instanceof DialableFaxNumber) && (fax.getPhoneCountry() instanceof Country) && (this.getFaxAreaCode() != null) && (this.getFaxNumber() != null) && (this.getFaxAreaCode() > 0) && (this.getFaxNumber() > 0)) {
                        // Now the number must be given
                        if (fax.getPhoneAreaCode() == null) {
                                // Is null
@@ -370,7 +370,7 @@ public class UserWebBean implements UserWebController {
                }
 
                // Is the provider set?
-               if ((cellphone instanceof DialableCellphoneNumber) && (this.getCellphoneCarrier() instanceof SmsProvider) && (this.getCellphoneNumber() > 0)) {
+               if ((cellphone instanceof DialableCellphoneNumber) && (this.getCellphoneCarrier() instanceof SmsProvider) && (this.getCellphoneNumber() != null) && (this.getCellphoneNumber() > 0)) {
                        // Is the number set?
                        if (cellphone.getPhoneNumber() == null) {
                                // Is null