From: Roland Häder Date: Tue, 31 Jan 2023 14:03:43 +0000 (+0100) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=181eaf8e057d9e6e1a065cd2587e184b82007cff;p=jfinancials-ejb.git Please cherry-pick: - some debug lines added --- diff --git a/src/java/org/mxchange/jcountry/model/data/FinancialsAdminCountrySingletonBean.java b/src/java/org/mxchange/jcountry/model/data/FinancialsAdminCountrySingletonBean.java index ad38c5e..c27e388 100644 --- a/src/java/org/mxchange/jcountry/model/data/FinancialsAdminCountrySingletonBean.java +++ b/src/java/org/mxchange/jcountry/model/data/FinancialsAdminCountrySingletonBean.java @@ -102,11 +102,17 @@ public class FinancialsAdminCountrySingletonBean extends BaseFinancialsEnterpris * @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 FinancialsAdminCountrySingletonBean extends BaseFinancialsEnterpris } } + // Trace message + this.getLoggerBeanLocal().logTrace(MessageFormat.format("{0}.isCountryAdded: isAdded={1} - CALLED!", this.getClass().getSimpleName(), isAdded)); //NOI18N + // Return result return isAdded; }