From 01972771ebd52760681b17aac2848918e5c5eb08 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 10 Jun 2020 20:11:35 +0200 Subject: [PATCH] Please cherry-pick: - initialization of "controller" (aka. backing bean) instances can be done right before the moment they are used MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../JobsCompanyOpeningTimeConverter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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) { -- 2.39.5