From a57a2ed851b818456421f3ce082dc6813da6b736 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 20 Feb 2020 09:43:03 +0100 Subject: add two jUnit test and CodeStyle modifications --- .../impl/idp/controller/protocols/RequestImpl.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java') diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java index 07fc652a..5110d2bf 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java @@ -32,13 +32,6 @@ import java.util.UUID; import javax.annotation.Nonnull; import javax.servlet.http.HttpServletRequest; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.lang.NonNull; -import org.springframework.lang.Nullable; -import org.springframework.util.Assert; - import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.data.EaafConstants; import at.gv.egiz.eaaf.core.api.idp.IConfiguration; @@ -52,12 +45,21 @@ import at.gv.egiz.eaaf.core.impl.utils.HttpUtils; import at.gv.egiz.eaaf.core.impl.utils.Random; import at.gv.egiz.eaaf.core.impl.utils.TransactionIdUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; +import org.springframework.util.Assert; + public abstract class RequestImpl implements IRequest, Serializable { private static final Logger log = LoggerFactory.getLogger(RequestImpl.class); public static final String DATAID_REQUESTER_IP_ADDRESS = "reqestImpl_requesterIPAddr"; + private static final String ERROR_CODE_INTERNAL_00 = "eaaf.core.00"; + private static final long serialVersionUID = 1L; private String module = null; @@ -143,14 +145,14 @@ public abstract class RequestImpl implements IRequest, Serializable { } catch (final MalformedURLException e) { log.error("IDP AuthenticationServiceURL Prefix is not a valid URL." + authUrlString, e); - throw new EaafAuthenticationException("errorId", new Object[] { authUrlString }, e); + throw new EaafAuthenticationException(ERROR_CODE_INTERNAL_00, new Object[] { authUrlString }, e); } this.idpAuthUrl = authConfig.validateIdpUrl(authReqUrl); if (this.idpAuthUrl == null) { log.warn( "Extract AuthenticationServiceURL: " + authReqUrl + " is NOT found in configuration."); - throw new EaafAuthenticationException("errorId", new Object[] { authUrlString }); + throw new EaafAuthenticationException(ERROR_CODE_INTERNAL_00, new Object[] { authUrlString }); } -- cgit v1.2.3