]> git.mxchange.org Git - jjobs-war.git/commitdiff
Some performance tuning: get list only if submittedValue is set non-empty
authorRoland Haeder <roland@mxchange.org>
Fri, 4 Mar 2016 20:45:00 +0000 (21:45 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 4 Mar 2016 20:45:00 +0000 (21:45 +0100)
src/java/org/mxchange/jjobs/converter/country/CountryConverter.java
src/java/org/mxchange/jjobs/converter/smsprovider/SmsProviderConverter.java

index 2f82e37787d423bb73c497dd2714cdc253aa87f8..12f96e1ba2130f5db1812220127e96ec1bb5c93b 100644 (file)
@@ -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<Country> 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<Country> countryList = this.countryController.allCountries();
+
                // Init value
                Country country = null;
 
index cd9df8ebde17391219f4858c1bd16c72bd254f53..7ed8f52464c519ac5aa737d09443252a67997cf9 100644 (file)
@@ -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<SmsProvider> 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<SmsProvider> providerList = this.providerController.allSmsProvider();
+
                // Init value
                SmsProvider provider = null;