]> git.mxchange.org Git - jaddressbook-lib.git/commitdiff
Opps, forgot to add fully read Contact object to list ...
authorKLC <KLC@NRW-450-190>
Mon, 20 Jul 2015 10:03:22 +0000 (12:03 +0200)
committerKLC <KLC@NRW-450-190>
Mon, 20 Jul 2015 10:03:22 +0000 (12:03 +0200)
Signed-off-by:KLC <KLC@NRW-450-190>

Addressbook/src/org/mxchange/addressbook/database/backend/csv/CsvDatabaseBackend.java

index b1d80126321850d07572d9d2a92a6f867c34bd71..b898e9be168303638282f077f8376c12c4d34c4f 100644 (file)
@@ -286,11 +286,20 @@ public class CsvDatabaseBackend extends BaseDatabaseBackend implements CsvBacken
                    case 0: // isOwnContact\r
                        assert((bool instanceof Boolean));\r
 \r
+                       // Debug message\r
+                       this.getLogger().debug(MessageFormat.format("bool={0}", bool));\r
+\r
                        // Is it own contact?\r
                        if (true == bool) {\r
+                           // Debug message\r
+                           this.getLogger().debug("Creating UserContact object ...");\r
+\r
                            // Own entry\r
                            contact = new UserContact();\r
                        } else {\r
+                           // Debug message\r
+                           this.getLogger().debug("Creating BookContact object ...");\r
+\r
                            // Other contact\r
                            contact = new BookContact();\r
                        }\r
@@ -406,6 +415,12 @@ public class CsvDatabaseBackend extends BaseDatabaseBackend implements CsvBacken
                // Increment counter for next round\r
                count++;\r
            }\r
+\r
+           // Is the contact read?\r
+           if (contact instanceof Contact) {\r
+               // Then add it\r
+               assert(list.add(contact));\r
+           }\r
        }\r
 \r
        // Return finished list\r