From: KLC Date: Mon, 20 Jul 2015 10:03:22 +0000 (+0200) Subject: Opps, forgot to add fully read Contact object to list ... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d6d27a79679aeffd940048575c43b364f514298d;p=jaddressbook-lib.git Opps, forgot to add fully read Contact object to list ... Signed-off-by:KLC --- diff --git a/Addressbook/src/org/mxchange/addressbook/database/backend/csv/CsvDatabaseBackend.java b/Addressbook/src/org/mxchange/addressbook/database/backend/csv/CsvDatabaseBackend.java index b1d80126..b898e9be 100644 --- a/Addressbook/src/org/mxchange/addressbook/database/backend/csv/CsvDatabaseBackend.java +++ b/Addressbook/src/org/mxchange/addressbook/database/backend/csv/CsvDatabaseBackend.java @@ -286,11 +286,20 @@ public class CsvDatabaseBackend extends BaseDatabaseBackend implements CsvBacken case 0: // isOwnContact assert((bool instanceof Boolean)); + // Debug message + this.getLogger().debug(MessageFormat.format("bool={0}", bool)); + // Is it own contact? if (true == bool) { + // Debug message + this.getLogger().debug("Creating UserContact object ..."); + // Own entry contact = new UserContact(); } else { + // Debug message + this.getLogger().debug("Creating BookContact object ..."); + // Other contact contact = new BookContact(); } @@ -406,6 +415,12 @@ public class CsvDatabaseBackend extends BaseDatabaseBackend implements CsvBacken // Increment counter for next round count++; } + + // Is the contact read? + if (contact instanceof Contact) { + // Then add it + assert(list.add(contact)); + } } // Return finished list