diff options
author | Thomas <> | 2022-03-10 11:32:29 +0100 |
---|---|---|
committer | Thomas <> | 2022-03-10 11:32:29 +0100 |
commit | 0e992e4f857aaf83aef059f63fd950a015b3de74 (patch) | |
tree | e2077feefaaa399834d429c54d15985ac6e53f9c /modules | |
parent | 3ca10561eedf25f1bec0de9849a72eb1421f4e07 (diff) | |
parent | d0196bc950695c2f780045709b0189e1845a16c0 (diff) | |
download | National_eIDAS_Gateway-0e992e4f857aaf83aef059f63fd950a015b3de74.tar.gz National_eIDAS_Gateway-0e992e4f857aaf83aef059f63fd950a015b3de74.tar.bz2 National_eIDAS_Gateway-0e992e4f857aaf83aef059f63fd950a015b3de74.zip |
Merge branch 'nightlybuild' into feature/ms_proxy_service
# Conflicts:
# modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/provider/StatusMessageProvider.java
Diffstat (limited to 'modules')
-rw-r--r-- | modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/provider/StatusMessageProvider.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/provider/StatusMessageProvider.java b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/provider/StatusMessageProvider.java index b47c0b63..cd913af2 100644 --- a/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/provider/StatusMessageProvider.java +++ b/modules/core_common_webapp/src/main/java/at/asitplus/eidas/specific/core/provider/StatusMessageProvider.java @@ -29,8 +29,6 @@ import java.util.MissingResourceException; import java.util.ResourceBundle; import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.context.MessageSource; import org.springframework.context.MessageSourceAware; import org.springframework.context.NoSuchMessageException; @@ -40,10 +38,12 @@ import org.springframework.stereotype.Service; import at.gv.egiz.eaaf.core.api.IStatusMessenger; import at.gv.egiz.eaaf.core.exceptions.EaafException; import at.gv.egiz.eaaf.core.impl.logging.LogMessageProviderFactory; +import lombok.extern.slf4j.Slf4j; @Service("StatusMessageProvider") +@Slf4j public class StatusMessageProvider implements IStatusMessenger, MessageSourceAware { - private static final Logger log = LoggerFactory.getLogger(StatusMessageProvider.class); + private static final String ERROR_MESSAGES_UNAVAILABLE = "Error messages can NOT be load from application. Only errorCode: {0} is availabe"; @@ -53,9 +53,11 @@ public class StatusMessageProvider implements IStatusMessenger, MessageSourceAwa "External error-codes can NOT be load from application. Only internal errorCode: {0} is availabe"; private static final String ERROR_NO_EXTERNALERROR_CODE = "No external error for internal error with number.={0}"; + private static final String MSG_WARN_NO_SOURCE = "MessageCode: {} is NOT SET for locale: {}"; private static final String MSG_INFO = "Use locale: {} as default"; + // external error codes private static final String DEFAULT_EXTERNALERROR_RESOURCES = "properties/external_statuscodes_map"; private static final Locale DEFAULT_EXTERNALERROR_LOCALES = new Locale("en", "GB"); @@ -86,6 +88,7 @@ public class StatusMessageProvider implements IStatusMessenger, MessageSourceAwa } + } catch (final MissingResourceException e2) { log.warn("No message source", e2); @@ -101,6 +104,7 @@ public class StatusMessageProvider implements IStatusMessenger, MessageSourceAwa if (messageSource == null) { return MessageFormat.format(ERROR_MESSAGES_UNAVAILABLE, new Object[]{messageId}); + } else { try { final Locale locale = LocaleContextHolder.getLocale(); |