aboutsummaryrefslogtreecommitdiffstats
path: root/feature-test-transaction
diff options
context:
space:
mode:
Diffstat (limited to 'feature-test-transaction')
-rw-r--r--feature-test-transaction/checkstyle-suppressions.xml33
-rw-r--r--feature-test-transaction/pom.xml36
-rw-r--r--feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransaction.java2
3 files changed, 70 insertions, 1 deletions
diff --git a/feature-test-transaction/checkstyle-suppressions.xml b/feature-test-transaction/checkstyle-suppressions.xml
new file mode 100644
index 00000000..7112bbe4
--- /dev/null
+++ b/feature-test-transaction/checkstyle-suppressions.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2018 AT&T Technologies. 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=========================================================
+-->
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+
+<suppressions>
+ <suppress checks="AbbreviationAsWordInName"
+ files="TestTransaction.java"
+ lines="1-9999"/>
+ <suppress checks="OneTopLevelClass"
+ files="TestTransaction.java"
+ lines="1-9999"/>
+</suppressions>
diff --git a/feature-test-transaction/pom.xml b/feature-test-transaction/pom.xml
index 92c8e217..f16a50f2 100644
--- a/feature-test-transaction/pom.xml
+++ b/feature-test-transaction/pom.xml
@@ -84,6 +84,42 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>onap-java-style</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <!-- Use Google Java Style Guide: https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
+ with minor changes -->
+ <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
+ <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <includeResources>true</includeResources>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <includeTestResources>true</includeTestResources>
+ <excludes>
+ </excludes>
+ <suppressionsLocation>${project.baseUri}checkstyle-suppressions.xml</suppressionsLocation>
+ <consoleOutput>true</consoleOutput>
+ <failsOnViolation>true</failsOnViolation>
+ <violationSeverity>warning</violationSeverity>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.oparent</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>${oparent.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+ </plugin>
</plugins>
</build>
<dependencies>
diff --git a/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransaction.java b/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransaction.java
index 3adecddc..c778bf67 100644
--- a/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransaction.java
+++ b/feature-test-transaction/src/main/java/org/onap/policy/drools/testtransaction/TestTransaction.java
@@ -141,7 +141,7 @@ class TTControllerTask implements Runnable {
if (!(this.controller.getDrools().isBrained())) {
this.alive = false;
- logger.error(this + ": unknown drools controller");
+ logger.error("{}: unknown drools controller", this);
return;
}