From a075d0abde73eb4304bce2fe228a7c9b32ff77f6 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 4 Mar 2016 21:45:00 +0100 Subject: [PATCH] Some performance tuning: get list only if submittedValue is set non-empty --- .../mxchange/jjobs/converter/country/CountryConverter.java | 6 +++--- .../jjobs/converter/smsprovider/SmsProviderConverter.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/org/mxchange/jjobs/converter/country/CountryConverter.java b/src/java/org/mxchange/jjobs/converter/country/CountryConverter.java index 2f82e377..12f96e1b 100644 --- a/src/java/org/mxchange/jjobs/converter/country/CountryConverter.java +++ b/src/java/org/mxchange/jjobs/converter/country/CountryConverter.java @@ -75,9 +75,6 @@ public class CountryConverter implements Converter { // Trace message this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2},this.countryController={3} - CALLED!", context, component, submittedValue, this.countryController)); //NOI18N - // Get full list - List countryList = this.countryController.allCountries(); - // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Trace message @@ -87,6 +84,9 @@ public class CountryConverter implements Converter { return null; } + // Get full list + List countryList = this.countryController.allCountries(); + // Init value Country country = null; diff --git a/src/java/org/mxchange/jjobs/converter/smsprovider/SmsProviderConverter.java b/src/java/org/mxchange/jjobs/converter/smsprovider/SmsProviderConverter.java index cd9df8eb..7ed8f524 100644 --- a/src/java/org/mxchange/jjobs/converter/smsprovider/SmsProviderConverter.java +++ b/src/java/org/mxchange/jjobs/converter/smsprovider/SmsProviderConverter.java @@ -75,9 +75,6 @@ public class SmsProviderConverter implements Converter { // Trace message this.loggerBeanLocal.logTrace(MessageFormat.format("getAsObject: context={0},component={1},submittedValue={2} - CALLED!", context, component, submittedValue)); //NOI18N - // Get full list - List providerList = this.providerController.allSmsProvider(); - // Is the value null or empty? if ((null == submittedValue) || (submittedValue.trim().isEmpty())) { // Trace message @@ -87,6 +84,9 @@ public class SmsProviderConverter implements Converter { return null; } + // Get full list + List providerList = this.providerController.allSmsProvider(); + // Init value SmsProvider provider = null; -- 2.39.5