From d6d27a79679aeffd940048575c43b364f514298d Mon Sep 17 00:00:00 2001 From: KLC Date: Mon, 20 Jul 2015 12:03:22 +0200 Subject: [PATCH] Opps, forgot to add fully read Contact object to list ... Signed-off-by:KLC --- .../database/backend/csv/CsvDatabaseBackend.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 b1d8012..b898e9b 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 -- 2.39.5