From 9b3d98641cff885c445efe99c7df6d33ae66a5e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 31 Jan 2023 15:03:43 +0100 Subject: [PATCH] Please cherry-pick: - some debug lines added --- .../model/data/AddressbookAdminCountrySingletonBean.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/java/org/mxchange/jcountry/model/data/AddressbookAdminCountrySingletonBean.java b/src/java/org/mxchange/jcountry/model/data/AddressbookAdminCountrySingletonBean.java index 95d92ff..7bf94a7 100644 --- a/src/java/org/mxchange/jcountry/model/data/AddressbookAdminCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/model/data/AddressbookAdminCountrySingletonBean.java @@ -102,11 +102,17 @@ public class AddressbookAdminCountrySingletonBean extends BaseAddressbookEnterpr * @return Whether the country was found */ private boolean isCountryAdded (final Country country) { + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isCountryAdded: country={1} - CALLED!", this.getClass().getSimpleName(), country)); //NOI18N + // Default is not found boolean isAdded = false; // Try to match code/i18n key (should be both unique!) for (final Country currentCountry : this.countryBean.fetchAllCountries()) { + // Debug message + this.getLoggerBeanLocal().logDebug(MessageFormat.format("{0}.isCountryAdded: country={1},currentCountry={2}", this.getClass().getSimpleName(), country, currentCountry)); //NOI18N + // Is it matching if (Objects.equals(country, currentCountry)) { // Yes, then set flag and abort loop @@ -115,6 +121,9 @@ public class AddressbookAdminCountrySingletonBean extends BaseAddressbookEnterpr } } + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isCountryAdded: isAdded={1} - CALLED!", this.getClass().getSimpleName(), isAdded)); //NOI18N + // Return result return isAdded; } -- 2.39.5