From d23a8d83d67ab59dee405b29ddbc6dce6fd3c71b Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 17 Jun 2021 13:02:08 -0400 Subject: Use lombok in policy-common utils Issue-ID: POLICY-3394 Change-Id: I42a18c115c3ca7110f37fc0ae8aeea3f2bbffb37 Signed-off-by: Jim Hahn --- .../org/onap/policy/common/utils/validation/Assertions.java | 11 ++++------- .../common/utils/validation/ParameterValidationUtils.java | 10 +++++----- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'utils/src/main/java/org/onap/policy/common/utils/validation') diff --git a/utils/src/main/java/org/onap/policy/common/utils/validation/Assertions.java b/utils/src/main/java/org/onap/policy/common/utils/validation/Assertions.java index 047989e7..8e474204 100644 --- a/utils/src/main/java/org/onap/policy/common/utils/validation/Assertions.java +++ b/utils/src/main/java/org/onap/policy/common/utils/validation/Assertions.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. * Modifications Copyright (C) 2019 Nordix Foundation. - * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019, 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. @@ -22,6 +22,8 @@ package org.onap.policy.common.utils.validation; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -29,16 +31,11 @@ import org.slf4j.LoggerFactory; * The Class Assertions is a static class that is used as a shorthand for assertions in the source code. * It throws runtime exceptions on assertion fails. */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) public final class Assertions { // Logger for this class private static final Logger LOGGER = LoggerFactory.getLogger(Assertions.class); - /** - * Private constructor used to prevent sub class instantiation. - */ - private Assertions() { - } - /** * Gets the validation message for a string parameter. * diff --git a/utils/src/main/java/org/onap/policy/common/utils/validation/ParameterValidationUtils.java b/utils/src/main/java/org/onap/policy/common/utils/validation/ParameterValidationUtils.java index f15d936b..0723242d 100644 --- a/utils/src/main/java/org/onap/policy/common/utils/validation/ParameterValidationUtils.java +++ b/utils/src/main/java/org/onap/policy/common/utils/validation/ParameterValidationUtils.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019, 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,17 +21,17 @@ package org.onap.policy.common.utils.validation; +import lombok.AccessLevel; +import lombok.NoArgsConstructor; + /** * Class to provide utility methods for common parameter validations. * * @author Ram Krishna Verma (ram.krishna.verma@ericsson.com) */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) public class ParameterValidationUtils { - private ParameterValidationUtils() { - - } - /** * Validates the given string input. * -- cgit 1.2.3-korg