]> git.mxchange.org Git - jaddressbook-lib.git/commitdiff
Saved direct enum name + used it again makes the code much sweeter, still the Console...
authorRoland Haeder <roland@mxchange.org>
Mon, 10 Aug 2015 13:38:18 +0000 (15:38 +0200)
committerRoland Haeder <roland@mxchange.org>
Mon, 10 Aug 2015 13:38:18 +0000 (15:38 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

Addressbook/src/org/mxchange/addressbook/database/frontend/contact/AddressbookContactDatabaseFrontend.java

index 7442ef72dac20a88cf966e4fc99c4ff33cadd09d..97593c63b880bce0b96f052c36b4c3abeff53445 100644 (file)
@@ -376,9 +376,9 @@ public class AddressbookContactDatabaseFrontend extends BaseDatabaseFrontend imp
                        this.getLogger().debug(MessageFormat.format("strippedToken={0},num={1},bool={2}", strippedToken, num, bool)); //NOI18N
 
                        // Now, let's try a gender check, if no null
-                       if ((strippedToken != null) && (num == null) && (bool == null) && ((strippedToken.equals("M")) || (strippedToken.equals("F")) || (strippedToken.equals("C")))) { //NOI18N
+                       if ((strippedToken != null) && (num == null) && (bool == null) && (Gender.valueOf(strippedToken) instanceof Gender)) { //NOI18N
                                // Get first character
-                               gender = Gender.fromChar(strippedToken.charAt(0));
+                               gender = Gender.valueOf(strippedToken);
 
                                // Debug message
                                this.getLogger().debug(MessageFormat.format("strippedToken={0},gender={1}", strippedToken, gender)); //NOI18N