From 3fada6cef21c9b16467177d866df778203b51b4d Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 5 Dec 2019 09:52:48 +0100 Subject: some code code-style modifications active code-quality checks! --- .../core/exceptions/AttributeBuilderException.java | 2 +- .../core/exceptions/AttributePolicyException.java | 1 - .../exceptions/AuthnRequestValidatorException.java | 23 +++++++++------------- .../exceptions/EaafAuthenticationException.java | 2 -- .../eaaf/core/exceptions/EaafBuilderException.java | 4 ++-- .../exceptions/EaafConfigurationException.java | 3 +-- .../egiz/eaaf/core/exceptions/EaafException.java | 15 ++++++++------ .../eaaf/core/exceptions/EaafIdpException.java | 2 +- .../core/exceptions/EaafIllegalStateException.java | 2 +- .../core/exceptions/EaafJsonMapperException.java | 5 ++--- .../core/exceptions/EaafProtocolException.java | 2 +- .../eaaf/core/exceptions/EaafServiceException.java | 2 -- .../eaaf/core/exceptions/EaafStorageException.java | 7 +++---- .../InvalidDateFormatAttributeException.java | 2 -- .../InvalidProtocolRequestException.java | 1 - .../PendingReqIdValidationException.java | 22 +++++++++------------ .../core/exceptions/ProcessExecutionException.java | 9 +++++---- .../core/exceptions/TaskExecutionException.java | 12 +++++------ .../exceptions/UnavailableAttributeException.java | 1 - .../egiz/eaaf/core/exceptions/XPathException.java | 2 -- 20 files changed, 49 insertions(+), 70 deletions(-) (limited to 'eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions') diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributeBuilderException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributeBuilderException.java index 2a96490b..e98ffca0 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributeBuilderException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributeBuilderException.java @@ -24,7 +24,7 @@ public class AttributeBuilderException extends EaafIdpException { private static final long serialVersionUID = 1L; public AttributeBuilderException(final String attrName) { - super("builder.12", new Object[] {attrName}); + super("builder.12", new Object[] { attrName }); } } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributePolicyException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributePolicyException.java index abbe56aa..a91d7520 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributePolicyException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AttributePolicyException.java @@ -17,7 +17,6 @@ * works that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egiz.eaaf.core.exceptions; public class AttributePolicyException extends AttributeBuilderException { diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java index 32ad97b7..b30363fa 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/AuthnRequestValidatorException.java @@ -39,8 +39,7 @@ public class AuthnRequestValidatorException extends EaafProtocolException { } - public AuthnRequestValidatorException(final String internalMsgId, final Object[] params, - final Throwable e) { + public AuthnRequestValidatorException(final String internalMsgId, final Object[] params, final Throwable e) { super(internalMsgId, params, e); } @@ -49,8 +48,8 @@ public class AuthnRequestValidatorException extends EaafProtocolException { * Protocol validation error. * * @param internalMsgId Internal error-code - * @param params Message parameters - * @param errorRequest Pending-Request that generates the error + * @param params Message parameters + * @param errorRequest Pending-Request that generates the error */ public AuthnRequestValidatorException(final String internalMsgId, final Object[] params, final IRequest errorRequest) { @@ -60,15 +59,15 @@ public class AuthnRequestValidatorException extends EaafProtocolException { } /** - * Protocol validation error. + * Protocol validation error. * * @param internalMsgId Internal error-code - * @param params Message parameters - * @param errorRequest Pending-Request that generates the error - * @param e error + * @param params Message parameters + * @param errorRequest Pending-Request that generates the error + * @param e error */ - public AuthnRequestValidatorException(final String internalMsgId, final Object[] params, - final IRequest errorRequest, final Throwable e) { + public AuthnRequestValidatorException(final String internalMsgId, final Object[] params, final IRequest errorRequest, + final Throwable e) { super(internalMsgId, params, e); this.errorRequest = errorRequest; @@ -91,8 +90,4 @@ public class AuthnRequestValidatorException extends EaafProtocolException { this.statusCodeValue = statusCodeValue; } - - - - } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java index 7dbf0a5d..22c8a8ca 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafAuthenticationException.java @@ -21,8 +21,6 @@ package at.gv.egiz.eaaf.core.exceptions; public class EaafAuthenticationException extends EaafException { - - private static final long serialVersionUID = -4793625336456467005L; public EaafAuthenticationException(final String internalMsgId, final Object[] params) { diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafBuilderException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafBuilderException.java index 39b26f38..70e75e87 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafBuilderException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafBuilderException.java @@ -22,7 +22,7 @@ package at.gv.egiz.eaaf.core.exceptions; public class EaafBuilderException extends EaafException { private static final long serialVersionUID = 1L; - private String msg; + private final String msg; public EaafBuilderException(final String errorId, final Object[] params, final String msg) { super(errorId, params); @@ -33,7 +33,7 @@ public class EaafBuilderException extends EaafException { super(errorId, objects, ex); this.msg = message; } - + public String getDetailMessage() { return this.msg; } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafConfigurationException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafConfigurationException.java index c40dc2a4..7ae749a1 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafConfigurationException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafConfigurationException.java @@ -11,7 +11,7 @@ * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the Licence for the specific language governing permissions and limitations under * the Licence. - * + * * This product combines work with different licenses. See the "NOTICE" text file for details on the * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative * works that you distribute must include a readable copy of the "NOTICE" text file. @@ -21,7 +21,6 @@ package at.gv.egiz.eaaf.core.exceptions; public class EaafConfigurationException extends EaafException { - private static final long serialVersionUID = 1L; public EaafConfigurationException(final String msg, final Object[] params) { diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java index 89011a87..351c6bbe 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafException.java @@ -20,7 +20,9 @@ package at.gv.egiz.eaaf.core.exceptions; import java.util.Arrays; + import javax.annotation.Nullable; + import at.gv.egiz.eaaf.core.impl.logging.LogMessageProviderFactory; public class EaafException extends Exception { @@ -38,8 +40,9 @@ public class EaafException extends Exception { /** * Generic processing-error in EAAF framework. * - * @param errorId Internal error-code that is also used to generate i18n messages - * @param params Message parameters + * @param errorId Internal error-code that is also used to generate i18n + * messages + * @param params Message parameters */ public EaafException(final String errorId, final Object[] params) { super(LogMessageProviderFactory.getMessager().getMessage(errorId, params)); @@ -48,13 +51,13 @@ public class EaafException extends Exception { } - /** * Generic processing-error in EAAF framework. * - * @param errorId Internal error-code that is also used to generate i18n messages - * @param params Message parameters - * @param e Exception + * @param errorId Internal error-code that is also used to generate i18n + * messages + * @param params Message parameters + * @param e Exception */ public EaafException(final String errorId, final Object[] params, final Throwable e) { super(LogMessageProviderFactory.getMessager().getMessage(errorId, params), e); diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIdpException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIdpException.java index 234a6971..52f9abbb 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIdpException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIdpException.java @@ -11,7 +11,7 @@ * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the Licence for the specific language governing permissions and limitations under * the Licence. - * + * * This product combines work with different licenses. See the "NOTICE" text file for details on the * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative * works that you distribute must include a readable copy of the "NOTICE" text file. diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIllegalStateException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIllegalStateException.java index 09414cab..34544a95 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIllegalStateException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafIllegalStateException.java @@ -11,7 +11,7 @@ * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the Licence for the specific language governing permissions and limitations under * the Licence. - * + * * This product combines work with different licenses. See the "NOTICE" text file for details on the * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative * works that you distribute must include a readable copy of the "NOTICE" text file. diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafJsonMapperException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafJsonMapperException.java index 0d24cb3a..331a9551 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafJsonMapperException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafJsonMapperException.java @@ -2,15 +2,14 @@ package at.gv.egiz.eaaf.core.exceptions; public class EaafJsonMapperException extends EaafParserException { - private static final long serialVersionUID = 2278865064672630267L; public EaafJsonMapperException(final String reason) { - super("parser.03", new Object[] {reason}); + super("parser.03", new Object[] { reason }); } public EaafJsonMapperException(final String reason, final Throwable ex) { - super("parser.03", new Object[] {reason}, ex); + super("parser.03", new Object[] { reason }, ex); } } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafProtocolException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafProtocolException.java index 1aab2e55..d5d73608 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafProtocolException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafProtocolException.java @@ -11,7 +11,7 @@ * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the Licence for the specific language governing permissions and limitations under * the Licence. - * + * * This product combines work with different licenses. See the "NOTICE" text file for details on the * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative * works that you distribute must include a readable copy of the "NOTICE" text file. diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafServiceException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafServiceException.java index 2d26a8bf..7ba10d54 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafServiceException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafServiceException.java @@ -24,6 +24,4 @@ public abstract class EaafServiceException extends EaafException { @Nonnull protected abstract String getServiceIdentifier(); - - } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafStorageException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafStorageException.java index 1df2e5dc..990e7108 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafStorageException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/EaafStorageException.java @@ -11,7 +11,7 @@ * is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the Licence for the specific language governing permissions and limitations under * the Licence. - * + * * This product combines work with different licenses. See the "NOTICE" text file for details on the * various modules and licenses. The "NOTICE" text file is part of the distribution. Any derivative * works that you distribute must include a readable copy of the "NOTICE" text file. @@ -24,12 +24,11 @@ public class EaafStorageException extends EaafException { private static final long serialVersionUID = 1L; public EaafStorageException(final String msg) { - super("internal.02", new Object[] {msg}); + super("internal.02", new Object[] { msg }); } public EaafStorageException(final String msg, final Throwable e) { - super("internal.02", new Object[] {msg}, e); + super("internal.02", new Object[] { msg }, e); } - } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidDateFormatAttributeException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidDateFormatAttributeException.java index 9ae02e07..aeddeaac 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidDateFormatAttributeException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidDateFormatAttributeException.java @@ -27,6 +27,4 @@ public class InvalidDateFormatAttributeException extends AttributeBuilderExcepti super("Date format is invalid."); } - - } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidProtocolRequestException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidProtocolRequestException.java index 2d1847af..1a0437ab 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidProtocolRequestException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/InvalidProtocolRequestException.java @@ -19,7 +19,6 @@ package at.gv.egiz.eaaf.core.exceptions; - public class InvalidProtocolRequestException extends EaafProtocolException { private static final long serialVersionUID = -7866198705324084601L; diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/PendingReqIdValidationException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/PendingReqIdValidationException.java index 124881c2..ddc051b0 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/PendingReqIdValidationException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/PendingReqIdValidationException.java @@ -1,7 +1,7 @@ package at.gv.egiz.eaaf.core.exceptions; - import javax.annotation.Nonnull; + import at.gv.egiz.eaaf.core.api.IRequest; public class PendingReqIdValidationException extends EaafException { @@ -15,11 +15,10 @@ public class PendingReqIdValidationException extends EaafException { * Pending-Request Id validation error. * * @param internalPendingReqId Internal Pending-Request Id - * @param reason error-message + * @param reason error-message */ - public PendingReqIdValidationException(final String internalPendingReqId, - @Nonnull final String reason) { - super("process.99", new Object[] {internalPendingReqId, reason}); + public PendingReqIdValidationException(final String internalPendingReqId, @Nonnull final String reason) { + super("process.99", new Object[] { internalPendingReqId, reason }); this.invalidInternalPendingReqId = internalPendingReqId; } @@ -28,12 +27,12 @@ public class PendingReqIdValidationException extends EaafException { * Pending-Request Id validation error. * * @param internalPendingReqId Internal Pending-Request Id - * @param reason error-message - * @param e error + * @param reason error-message + * @param e error */ - public PendingReqIdValidationException(final String internalPendingReqId, - @Nonnull final String reason, final Throwable e) { - super("process.99", new Object[] {internalPendingReqId, reason}, e); + public PendingReqIdValidationException(final String internalPendingReqId, @Nonnull final String reason, + final Throwable e) { + super("process.99", new Object[] { internalPendingReqId, reason }, e); this.invalidInternalPendingReqId = internalPendingReqId; } @@ -46,7 +45,6 @@ public class PendingReqIdValidationException extends EaafException { return invalidPendingReq; } - /** * Get the internal invalid pending-request id. * @@ -61,6 +59,4 @@ public class PendingReqIdValidationException extends EaafException { } - - } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProcessExecutionException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProcessExecutionException.java index d24a438d..8d97ada5 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProcessExecutionException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProcessExecutionException.java @@ -30,18 +30,19 @@ public class ProcessExecutionException extends Exception { private static final long serialVersionUID = 1L; /** - * Creates a new process execution exception providing a {@code message} describing the reason and - * the respective {@code cause}. + * Creates a new process execution exception providing a {@code message} + * describing the reason and the respective {@code cause}. * * @param message The message. - * @param cause The cause. + * @param cause The cause. */ public ProcessExecutionException(final String message, final Throwable cause) { super(message, cause); } /** - * Creates a new process execution exception providing a {@code message} describing the reason. + * Creates a new process execution exception providing a {@code message} + * describing the reason. * * @param message The message. */ diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java index 61149691..deccb6f0 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java @@ -37,11 +37,10 @@ public class TaskExecutionException extends ProcessExecutionException { * Task execution error. * * @param pendingReq Current processed pending-request - * @param message error message - * @param cause error reason + * @param message error message + * @param cause error reason */ - public TaskExecutionException(final IRequest pendingReq, final String message, - final Throwable cause) { + public TaskExecutionException(final IRequest pendingReq, final String message, final Throwable cause) { super(message, cause); this.originalException = cause; @@ -62,7 +61,8 @@ public class TaskExecutionException extends ProcessExecutionException { } /** - * Get the pending-request ID of that request, which was processed when the exception occurs. + * Get the pending-request ID of that request, which was processed when the + * exception occurs. * * @return the pendingRequestID */ @@ -70,6 +70,4 @@ public class TaskExecutionException extends ProcessExecutionException { return pendingRequestID; } - - } diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/UnavailableAttributeException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/UnavailableAttributeException.java index 5bc0880b..2bec2d2b 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/UnavailableAttributeException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/UnavailableAttributeException.java @@ -21,7 +21,6 @@ package at.gv.egiz.eaaf.core.exceptions; public class UnavailableAttributeException extends AttributeBuilderException { - private static final long serialVersionUID = -1114323185905118432L; private final String attributeName; diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/XPathException.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/XPathException.java index d3c41994..b20efe3d 100644 --- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/XPathException.java +++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/exceptions/XPathException.java @@ -17,8 +17,6 @@ * works that you distribute must include a readable copy of the "NOTICE" text file. */ - - package at.gv.egiz.eaaf.core.exceptions; import java.io.PrintStream; -- cgit v1.2.3