diff options
author | Jim Hahn <jrh3@att.com> | 2021-06-17 10:32:25 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-06-17 11:15:29 -0400 |
commit | 20ec0e70ce690083d65286815ed5e866042881a2 (patch) | |
tree | 081f9a05fba79f6715e797e16c9d37916bcbef7b /common-logging/src/main/java/org/onap/policy/common/logging/eelf/ErrorCodeMap.java | |
parent | 8bec395a3d4ddff8bd0daca685f3e2162a9b5193 (diff) |
Use lombok annotations in IM and ONAP logging
Issue-ID: POLICY-3394
Change-Id: I25db6b4b13bad8754889eaedb93197cae7d27c4d
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'common-logging/src/main/java/org/onap/policy/common/logging/eelf/ErrorCodeMap.java')
-rw-r--r-- | common-logging/src/main/java/org/onap/policy/common/logging/eelf/ErrorCodeMap.java | 11 |
1 files changed, 5 insertions, 6 deletions
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 32bb6fec..9e461916 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 @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-Logging * ================================================================================ - * Copyright (C) 2020 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018, 2020-2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,8 @@ package org.onap.policy.common.logging.eelf; import java.util.EnumMap; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; /** * ErrorCodeMap contains a HashMap of ErrorCodeInfo (error code and error description). @@ -32,7 +34,8 @@ import java.util.EnumMap; * 500 – business process errors * 900 – unknown errors */ -public class ErrorCodeMap { +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public final class ErrorCodeMap { private static final EnumMap<MessageCodes, ErrorCodeInfo> hm = new EnumMap<>(MessageCodes.class); @@ -93,10 +96,6 @@ public class ErrorCodeMap { hm.put(MessageCodes.ERROR_AUDIT, new ErrorCodeInfo(ERROR_AUDIT, ERROR_AUDIT_DESCRIPTION)); } - private ErrorCodeMap() { - // Private constructor to prevent subclassing - } - public static ErrorCodeInfo getErrorCodeInfo(MessageCodes messageCode) { return hm.get(messageCode); } |