diff options
Diffstat (limited to 'auth/cli-codegen')
2 files changed, 12 insertions, 31 deletions
diff --git a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/DummyStErrorListener.java b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/DummyStErrorListener.java index 45d307b47..572b40e74 100644 --- a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/DummyStErrorListener.java +++ b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/DummyStErrorListener.java @@ -1,25 +1,29 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ package org.onap.policy.apex.auth.clicodegen; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.Setter; import org.stringtemplate.v4.STErrorListener; import org.stringtemplate.v4.misc.STMessage; @@ -31,6 +35,8 @@ import org.stringtemplate.v4.misc.STMessage; public class DummyStErrorListener implements STErrorListener { /** Counts errors of the listener. */ + @Getter(AccessLevel.PROTECTED) + @Setter(AccessLevel.PROTECTED) private int errorCount; /** @@ -90,22 +96,4 @@ public class DummyStErrorListener implements STErrorListener { setErrorCount(getErrorCount() + 1); System.err.println("STG/ST (" + msg.error + ") " + msg.arg + " -> " + msg.cause); } - - /** - * Gets the error count. - * - * @return the error count - */ - protected int getErrorCount() { - return errorCount; - } - - /** - * Sets the error count. - * - * @param errorCount the new error count - */ - protected void setErrorCount(final int errorCount) { - this.errorCount = errorCount; - } } diff --git a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/SupportKeyInfoGetter.java b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/SupportKeyInfoGetter.java index 5547aa4f7..567991666 100644 --- a/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/SupportKeyInfoGetter.java +++ b/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/SupportKeyInfoGetter.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 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. @@ -20,6 +21,7 @@ package org.onap.policy.apex.auth.clicodegen; +import lombok.AllArgsConstructor; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.basicmodel.concepts.AxKeyInfo; import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey; @@ -30,22 +32,13 @@ import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; * * @author John Keeney (john.keeney@ericsson.com) */ - +@AllArgsConstructor public class SupportKeyInfoGetter { /** The policy model for the getters. */ private final AxPolicyModel model; /** - * Creates a new key getter. - * - * @param model the policy model to use - */ - public SupportKeyInfoGetter(final AxPolicyModel model) { - this.model = model; - } - - /** * Returns the key name as string. * * @param key the key to transform |