aboutsummaryrefslogtreecommitdiffstats
path: root/auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/DummyStErrorListener.java
diff options
context:
space:
mode:
Diffstat (limited to 'auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/DummyStErrorListener.java')
-rw-r--r--auth/cli-codegen/src/test/java/org/onap/policy/apex/auth/clicodegen/DummyStErrorListener.java30
1 files changed, 9 insertions, 21 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;
- }
}