]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Wed, 10 Jun 2020 18:11:35 +0000 (20:11 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 10 Jun 2020 18:11:35 +0000 (20:11 +0200)
- initialization of "controller" (aka. backing bean) instances can be done
  right before the moment they are used

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java

index de8761ba653c78f789729c25f661cbc7a560d9c7..e0bf6fd6cbdfb08aa411f5443bcd264cddeaa5fb 100644 (file)
@@ -51,16 +51,16 @@ public class JobsCompanyOpeningTimeConverter implements Converter<OpeningTime> {
                // Init instance
                OpeningTime openingTime = null;
 
-               // Is the instance there?
-               if (null == OPENING_TIME_LIST_CONTROLLER) {
-                       // Get bean from CDI directly
-                       OPENING_TIME_LIST_CONTROLLER = CDI.current().select(JobssOpeningTimeListWebViewBean.class).get();
-               }
-
                try {
                        // Try to parse the value as long
                        final Long openingTimeId = Long.valueOf(submittedValue);
 
+                       // Is the instance there?
+                       if (null == OPENING_TIMES_LIST_CONTROLLER) {
+                               // Get bean from CDI directly
+                               OPENING_TIMES_LIST_CONTROLLER = CDI.current().select(JobsOpeningTimeListWebViewBean.class).get();
+                       }
+
                        // Try to get user instance from it
                        openingTime = OPENING_TIMES_LIST_CONTROLLER.findOpeningTimeById(openingTimeId);
                } catch (final NumberFormatException ex) {