From 7a2f9222bdb216341b3101db6b6f9db4679f0eb2 Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 11 May 2023 11:10:01 +0200 Subject: [PATCH] SEBSERV-444 make secure --- .../gui/service/i18n/impl/PolyglotPageServiceImpl.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/PolyglotPageServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/PolyglotPageServiceImpl.java index c642653e..1a669a7f 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/PolyglotPageServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/PolyglotPageServiceImpl.java @@ -32,6 +32,8 @@ import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.Text; import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.TreeItem; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; @@ -51,6 +53,8 @@ import ch.ethz.seb.sebserver.gui.widget.Selection; @GuiProfile public final class PolyglotPageServiceImpl implements PolyglotPageService { + private static final Logger log = LoggerFactory.getLogger(PolyglotPageServiceImpl.class); + private final I18nSupport i18nSupport; public PolyglotPageServiceImpl(final I18nSupport i18nSupport) { @@ -95,7 +99,11 @@ public final class PolyglotPageServiceImpl implements PolyglotPageService { @Override public void injectI18n(final Label label, final LocTextKey locTextKey) { - injectI18n(label, locTextKey, null); + try { + injectI18n(label, locTextKey, null); + } catch (final Exception e) { + log.error("Failed to injectI18n: {}", e.getMessage()); + } } @Override