diff options
Diffstat (limited to 'common-logging')
3 files changed, 44 insertions, 13 deletions
diff --git a/common-logging/pom.xml b/common-logging/pom.xml index 1536f8e7..514b9cbd 100644 --- a/common-logging/pom.xml +++ b/common-logging/pom.xml @@ -3,7 +3,7 @@ ONAP Policy Engine - Common Modules ================================================================================ Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved. - Modifications Copyright (C) 2023 Nordix Foundation. + Modifications Copyright (C) 2023-2024 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -44,6 +44,43 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + </dependency> + <dependency> + <groupId>com.google.re2j</groupId> + <artifactId>re2j</artifactId> + </dependency> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <scope>test</scope> + </dependency> </dependencies> <build> diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/eelf/ErrorCodeMap.java b/common-logging/src/main/java/org/onap/policy/common/logging/eelf/ErrorCodeMap.java index 9e461916..0eaa06b0 100644 --- a/common-logging/src/main/java/org/onap/policy/common/logging/eelf/ErrorCodeMap.java +++ b/common-logging/src/main/java/org/onap/policy/common/logging/eelf/ErrorCodeMap.java @@ -3,6 +3,7 @@ * ONAP-Logging * ================================================================================ * Copyright (C) 2017-2018, 2020-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +23,7 @@ package org.onap.policy.common.logging.eelf; import java.util.EnumMap; import lombok.AccessLevel; +import lombok.Getter; import lombok.NoArgsConstructor; /** @@ -86,7 +88,6 @@ public final class ErrorCodeMap { new ErrorCodeInfo(MISS_PROPERTY_ERROR, MISS_PROPERTY_ERROR_DESCRIPTION)); hm.put(MessageCodes.UPDATE_ERROR, new ErrorCodeInfo(UPDATE_ERROR, UPDATE_ERROR_DESCRIPTION)); hm.put(MessageCodes.ERROR_SYSTEM_ERROR, new ErrorCodeInfo(ERROR_SYSTEM_ERROR, ERROR_SYSTEM_ERROR_DESCRIPTION)); - hm.put(MessageCodes.ERROR_DATA_ISSUE, new ErrorCodeInfo(ERROR_DATA_ISSUE, ERROR_DATA_ISSUE_DESCRIPTION)); hm.put(MessageCodes.ERROR_PERMISSIONS, new ErrorCodeInfo(ERROR_PERMISSIONS, ERROR_PERMISSIONS_DESCRIPTION)); hm.put(MessageCodes.ERROR_DATA_ISSUE, new ErrorCodeInfo(ERROR_DATA_ISSUE, ERROR_DATA_ISSUE_DESCRIPTION)); hm.put(MessageCodes.ERROR_PROCESS_FLOW, new ErrorCodeInfo(ERROR_PROCESS_FLOW, ERROR_PROCESS_FLOW_DESCRIPTION)); @@ -100,24 +101,17 @@ public final class ErrorCodeMap { return hm.get(messageCode); } + @Getter static class ErrorCodeInfo { - private String errorCode; - private String errorDesc; + private final String errorCode; + private final String errorDesc; public ErrorCodeInfo(String errorCode, String errorDesc) { this.errorCode = errorCode; this.errorDesc = errorDesc; } - public String getErrorCode() { - return errorCode; - } - - public String getErrorDesc() { - return errorDesc; - } - } } diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/eelf/OnapConfigProperties.java b/common-logging/src/main/java/org/onap/policy/common/logging/eelf/OnapConfigProperties.java index d71ebe54..cfb14643 100644 --- a/common-logging/src/main/java/org/onap/policy/common/logging/eelf/OnapConfigProperties.java +++ b/common-logging/src/main/java/org/onap/policy/common/logging/eelf/OnapConfigProperties.java @@ -61,7 +61,7 @@ public final class OnapConfigProperties { public static final String RESPONSE_CODE = "ResponseCode"; /** - * Human readable description of the application specific response code. + * Human-readable description of the application specific response code. */ public static final String RESPONSE_DESCRIPTION = "ResponseDescription"; |