]> git.mxchange.org Git - jaddressbook-lib.git/commitdiff
Better compare this way:
authorRoland Haeder <roland@mxchange.org>
Thu, 27 Aug 2015 06:52:41 +0000 (08:52 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 27 Aug 2015 07:21:49 +0000 (09:21 +0200)
if (null == foo)

Otherwise could lead to a bug if you miss only one equal sign

+ updated jcore
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jcore.jar
nbproject/project.properties
src/org/mxchange/addressbook/client/console/ConsoleClient.java
src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java
src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java
src/org/mxchange/addressbook/menu/AddressbookMenu.java
src/org/mxchange/addressbook/menu/BaseMenu.java
src/org/mxchange/addressbook/menu/console/ConsoleMenu.java
src/org/mxchange/addressbook/menu/item/console/ConsoleMenuItem.java

index f4bdc108ad5046a41cac1bfec183ec3cace35b8f..d75f9b63bad3754b5874cc870805afe33c6a3141 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index 8bc500c54bc0445eb502d0c73089a72becb98eda..9f32019ae0d916cb29ec5243d9a437ff3c0b498d 100644 (file)
@@ -1,10 +1,11 @@
 annotation.processing.enabled=true
-annotation.processing.enabled.in.editor=false
+annotation.processing.enabled.in.editor=true
 annotation.processing.processors.list=
 annotation.processing.run.all.processors=true
 annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
 application.title=Addressbook
 application.vendor=Roland Haeder
+auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
 build.classes.dir=${build.dir}/classes
 build.classes.excludes=**/*.java,**/*.form
 # This directory is removed when the project is cleaned:
@@ -34,7 +35,9 @@ file.reference.log4j-api-2.3.jar=lib/log4j-api-2.3.jar
 file.reference.log4j-core-2.3.jar=lib/log4j-core-2.3.jar
 file.reference.jcore.jar=./lib/jcore.jar
 includes=**
+jar.archive.disabled=${jnlp.enabled}
 jar.compress=false
+jar.index=${jnlp.enabled}
 javac.classpath=\
     ${file.reference.log4j-api-2.3.jar}:\
     ${file.reference.log4j-core-2.3.jar}:\
@@ -42,7 +45,7 @@ javac.classpath=\
     ${file.reference.commons-codec-1.10.jar}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:deprecation -Xlint:unchecked
-javac.deprecation=false
+javac.deprecation=true
 javac.processorpath=\
     ${javac.classpath}
 javac.source=1.7
@@ -53,20 +56,33 @@ javac.test.classpath=\
 javac.test.processorpath=\
     ${javac.test.classpath}
 javadoc.additionalparam=
-javadoc.author=false
+javadoc.author=true
 javadoc.encoding=${source.encoding}
 javadoc.noindex=false
 javadoc.nonavbar=false
 javadoc.notree=false
-javadoc.private=false
+javadoc.private=true
 javadoc.splitindex=true
 javadoc.use=true
-javadoc.version=false
-javadoc.windowtitle=
+javadoc.version=true
+javadoc.windowtitle=Addressbook Documentation
+jnlp.codebase.type=no.codebase
+jnlp.descriptor=application
+jnlp.enabled=false
+jnlp.mixed.code=default
+jnlp.offline-allowed=false
+jnlp.signed=false
+jnlp.signing=
+jnlp.signing.alias=
+jnlp.signing.keystore=
 main.class=org.mxchange.addressbook.application.AddressbookApplication
+# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed
+manifest.custom.codebase=
+# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions)
+manifest.custom.permissions=
 manifest.file=manifest.mf
 meta.inf.dir=${src.dir}/META-INF
-mkdist.disabled=false
+mkdist.disabled=true
 platform.active=default_platform
 project.license=gpl30
 run.classpath=\
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
                }
index 5f68c5c3bd599420183dc36f5f65e6d1104efedb..02089cbe250b75015cf39b32d196ecc9c533ae34 100644 (file)
@@ -58,7 +58,7 @@ public class AddressbookContactDatabaseFrontend extends BaseDatabaseFrontend imp
                this.getLogger().trace(MessageFormat.format("manager={0} - CALLED!", manager)); //NOI18N
 
                // Manager instance must not be null
-               if (manager == null) {
+               if (null == manager) {
                        // Abort here
                        throw new NullPointerException("manager is null"); //NOI18N
                }
@@ -89,7 +89,7 @@ public class AddressbookContactDatabaseFrontend extends BaseDatabaseFrontend imp
                this.getLogger().trace("CALLED!"); //NOI18N
 
                // Make sure the contact is set
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }
@@ -222,7 +222,7 @@ public class AddressbookContactDatabaseFrontend extends BaseDatabaseFrontend imp
                this.getLogger().trace(MessageFormat.format("contact={0} - CALLED!", contact)); //NOI18N
 
                // contact should not be null
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }
@@ -267,13 +267,13 @@ public class AddressbookContactDatabaseFrontend extends BaseDatabaseFrontend imp
        @Override
        public boolean isOwnContactFound () throws SQLException, IOException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Get search criteria instance
-               SearchableCriteria critera = new SearchCriteria();
+               SearchableCriteria criteria = new SearchCriteria();
 
                // Add condition
-               critera.addCriteria(AddressbookContactDatabaseConstants.COLUMN_OWN_CONTACT, true);
+               criteria.addCriteria(AddressbookContactDatabaseConstants.COLUMN_OWN_CONTACT, true);
 
                // Get result
-               Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(critera);
+               Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
 
                // Deligate this call to backend
                return result.hasNext();
index fd2a5388e5aad3a7776f3693d546cd2a3013097d..881d1baf25c5ecc50b443b1a1561ce7f51c2259a 100644 (file)
@@ -70,7 +70,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                this.getLogger().trace(MessageFormat.format("client={1} - CALLED!", client)); //NOI18N
 
                // Make sure all parameters are set correctly
-               if (client == null) {
+               if (null == client) {
                        // Abort here
                        throw new NullPointerException("client is null"); //NOI18N
                }
@@ -104,7 +104,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                this.getLogger().trace(MessageFormat.format("contact={0} - CALLED!", contact)); //NOI18N
 
                // Contact instance must not be null
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }
@@ -135,7 +135,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                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
                }
@@ -170,7 +170,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                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
                }
@@ -214,7 +214,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                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
                }
@@ -609,7 +609,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                this.getLogger().debug(MessageFormat.format("storeable={0}", storeable));
 
                // It may return null
-               if (storeable == null) {
+               if (null == storeable) {
                        // Nothing found
                        this.getLogger().warn("contact is null - returning null ...");
                        return null;
@@ -677,7 +677,7 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                this.getLogger().trace(MessageFormat.format("contact={0} CALLED!", contact)); //NOI18N
 
                // Sanity check
-               if (contact == null) {
+               if (null == contact) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                }
index 12257eb08d96aa8d80fbfba4cf5b53d00281e134..b59b13e04556b97cd939ebd7f963513ee74fb9d9 100644 (file)
@@ -46,10 +46,10 @@ public class AddressbookMenu extends BaseAddressbookSystem {
                log.trace(MessageFormat.format("menuList={0},menuType={1},client={2} - CALLED!", menuList, menuType, client)); //NOI18N
 
                // Some instances must be set
-               if (menuList == null) {
+               if (null == menuList) {
                        // Abort here
                        throw new NullPointerException("menuList is null"); //NOI18N
-               } else if (client == null) {
+               } else if (null == client) {
                        // Abort here
                        throw new NullPointerException("contact is null"); //NOI18N
                } else if (!(client instanceof AddressbookClient)) {
index f5548207938051251ef209dfec785099e29c3b17..207a9b319a7c5a24df4c1bb9de66f99083266b80 100644 (file)
@@ -70,7 +70,7 @@ public class BaseMenu extends BaseAddressbookSystem {
                this.getLogger().trace(MessageFormat.format("client={0} CALLED!", client)); //NOI18N
 
                // Client must not be null
-               if (client == null) {
+               if (null == client) {
                        // Abort here
                        throw new NullPointerException("client is null"); //NOI18N
                }
index 965f68ab0a58a820f19cec3407745b906e0b4329..b5c2e4311010b838df4a4acf818b4c76f2246969 100644 (file)
@@ -39,7 +39,7 @@ public class ConsoleMenu extends BaseMenu implements Menu {
                this.getLogger().trace(MessageFormat.format("menuType={0},client={1} - CALLED!", menuType, client)); //NOI18N
 
                // Client must not be null
-               if (client == null)  {
+               if (null == client)  {
                        // Abort here
                        throw new NullPointerException("client is null");
                }
index 1090a63f6c84bb9883f6e15ebb146e186dfa2291..091787d90735715bd11b8bfbc71f25833c6cb933 100644 (file)
@@ -93,7 +93,7 @@ public class ConsoleMenuItem extends BaseMenuItem implements SelectableMenuItem
                this.getLogger().trace(MessageFormat.format("client={0} - CALLED!", client)); //NOI18N
 
                // Client must not be null
-               if (client == null) {
+               if (null == client) {
                        // Abort here
                        throw new NullPointerException("client is null");
                } else if (!(client instanceof AddressbookClient)) {