From: Roland Häder Date: Wed, 10 Jun 2020 18:11:35 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=01972771ebd52760681b17aac2848918e5c5eb08;p=jjobs-war.git Please cherry-pick: - initialization of "controller" (aka. backing bean) instances can be done right before the moment they are used Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java b/src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java index de8761ba..e0bf6fd6 100644 --- a/src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java +++ b/src/java/org/mxchange/jjobs/converter/business/opening_time/JobsCompanyOpeningTimeConverter.java @@ -51,16 +51,16 @@ public class JobsCompanyOpeningTimeConverter implements Converter { // 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) {