]> git.mxchange.org Git - addressbook-lib.git/blobdiff - src/org/mxchange/addressbook/client/console/ConsoleClient.java
Better compare this way:
[addressbook-lib.git] / src / org / mxchange / addressbook / client / console / ConsoleClient.java
index 06a6cc2b4d2a58f24948d78ef9ce79724d105a85..92df18acf29968ac36e0904b80dd36b1cdad84a9 100644 (file)
@@ -83,7 +83,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                this.getLogger().trace(MessageFormat.format("contact={0} - CALLED!", contact)); //NOI18N
 
                // Is it null?
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }
@@ -106,7 +106,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                this.getLogger().trace(MessageFormat.format("contact={0} - CALLED!", contact)); //NOI18N
 
                // Is it null?
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }
@@ -118,7 +118,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                String companyName = contact.getCompanyName();
 
                // If it is empty/null, then assume private contact
-               if ((companyName == null) || (companyName.isEmpty())) {
+               if ((null == companyName) || (companyName.isEmpty())) {
                        // Now put all together: gender, surname, family name
                        // @todo Use mask
                        this.outputMessage(MessageFormat.format("Anrede, Vorname, Name: {0} {1} {2}", gender, contact.getFirstName(), contact.getFamilyName()));
@@ -142,7 +142,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                this.getLogger().trace(MessageFormat.format("contact={0} - CALLED!", contact)); //NOI18N
 
                // Is it null?
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }
@@ -160,7 +160,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                this.getLogger().trace(MessageFormat.format("contact={0} - CALLED!", contact)); //NOI18N
 
                // Is it null?
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }
@@ -202,7 +202,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                this.getLogger().trace(MessageFormat.format("contact={0} - CALLED!", contact)); //NOI18N
 
                // Is it null?
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }
@@ -244,7 +244,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                this.getLogger().trace(MessageFormat.format("contact={0} - CALLED!", contact)); //NOI18N
 
                // Is it null?
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }
@@ -418,7 +418,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                this.getLogger().trace(MessageFormat.format("validChars={0},message={1} - CALLED!", Arrays.toString(validChars), message)); //NOI18N
 
                // The validChars must not null be null and filled with at least one char
-               if (validChars == null) {
+               if (null == validChars) {
                        // Is null
                        throw new NullPointerException("validChars is null"); //NOI18N
                } else if (validChars.length == 0) {
@@ -535,7 +535,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                String input = null;
 
                // Check if it is to short or to long
-               while (((input == null) || ((input.length() < minLength) && (!allowEmpty))) || ((input.length() > 0) && (input.length() < minLength) && (allowEmpty)) || ((input instanceof String) && (input.length() > maxLength))) {
+               while (((null == input) || ((input.length() < minLength) && (!allowEmpty))) || ((input.length() > 0) && (input.length() < minLength) && (allowEmpty)) || ((input instanceof String) && (input.length() > maxLength))) {
                        // Output message
                        System.out.print(message);
 
@@ -635,7 +635,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC
                this.getLogger().trace(MessageFormat.format("contact={0} CALLED!", contact)); //NOI18N
 
                // Contact must not be null
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }