Checkstyle: no space inside parentheses 16/51316/3
authorLorand Jakab <lojakab@cisco.com>
Thu, 2 Feb 2017 00:06:01 +0000 (02:06 +0200)
committerLori Jakab <lorand.jakab@gmail.com>
Mon, 13 Feb 2017 12:26:56 +0000 (12:26 +0000)
Add the ParenPad check to odl_checks.xml, which makes sure there is no
space after a left parenthesis and before a right parenthesis. Fix the
violations in odlparent.

Change-Id: Ib6cf36f05598f68ad034af67be17b8963bafba07
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
bundles-test/src/main/java/org/opendaylight/odlparent/bundlestest/BundleDiagInfos.java
bundles-test/src/main/java/org/opendaylight/odlparent/bundlestest/TestBundleDiag.java
bundles4-test/src/main/java/org/opendaylight/odlparent/bundles4test/BundleDiagInfos.java
bundles4-test/src/main/java/org/opendaylight/odlparent/bundles4test/TestBundleDiag.java
checkstyle/src/main/resources/odl_checks.xml

index 547e14999e1dafc71f15342a7e0c4ca94946ca68..8a53d68b88edafd68ed4fe8d433635b3769fc31e 100644 (file)
@@ -36,7 +36,7 @@ public class BundleDiagInfos {
     private final Map<BundleState, Integer> bundleStatesCounters;
 
     private static final Map<String, BundleState> WHITELISTED_BUNDLES = ImmutableMap.of(
-            "slf4j.log4j12", Installed );
+            "slf4j.log4j12", Installed);
 
     public static BundleDiagInfos forContext(BundleContext bundleContext, BundleService bundleService) {
         List<String> okBundleStateInfoTexts = new ArrayList<>();
index 4d72552febc8c65a2b2ec5fd2be496fab7008f78..7a0732ff4f00f72e9120131e49b6a197a192a474 100644 (file)
@@ -57,7 +57,7 @@ public class TestBundleDiag {
                     .conditionEvaluationListener(
                         condition -> LOG.info("{} (elapsed time {}s, remaining time {}s)",
                             ((BundleDiagInfos) condition.getValue()).getSummaryText(),
-                            condition.getElapsedTimeInMS() / 1000, condition.getRemainingTimeInMS() / 1000 ))
+                            condition.getElapsedTimeInMS() / 1000, condition.getRemainingTimeInMS() / 1000))
                     .until(() -> getBundleDiagInfos(), new BundleServiceSummaryMatcher());
 
             // If we're here then either BundleServiceSummaryMatcher quit because of Active, Failure or Stopping..
index 47f6f6e536d28d8c17fc4d9f2ef5b4d21ba3a010..47d698c5a4d04190a12df6b0856d394216cfeed2 100644 (file)
@@ -36,7 +36,7 @@ public class BundleDiagInfos {
     private final Map<BundleState, Integer> bundleStatesCounters;
 
     private static final Map<String, BundleState> WHITELISTED_BUNDLES = ImmutableMap.of(
-            "slf4j.log4j12", Installed );
+            "slf4j.log4j12", Installed);
 
     public static BundleDiagInfos forContext(BundleContext bundleContext, BundleService bundleService) {
         List<String> okBundleStateInfoTexts = new ArrayList<>();
index d1b87d91b23331bb0dd5054fa9ef481d4b18d9e5..88a585b3762de2aed596e6f63040b6b037f4ab63 100644 (file)
@@ -57,7 +57,7 @@ public class TestBundleDiag {
                     .conditionEvaluationListener(
                         condition -> LOG.info("{} (elapsed time {}s, remaining time {}s)",
                             ((BundleDiagInfos) condition.getValue()).getSummaryText(),
-                            condition.getElapsedTimeInMS() / 1000, condition.getRemainingTimeInMS() / 1000 ))
+                            condition.getElapsedTimeInMS() / 1000, condition.getRemainingTimeInMS() / 1000))
                     .until(() -> getBundleDiagInfos(), new BundleServiceSummaryMatcher());
 
             // If we're here then either BundleServiceSummaryMatcher quit because of Active, Failure or Stopping..
index db4f698d0cf1b467145a702f2ac9c86f9b43ddf0..f1c23365b16285a2f0bb00bb3fc77516c0ae9277 100644 (file)
@@ -75,6 +75,7 @@
              <message key="ws.notPreceded"
              value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
         </module>
+        <module name="ParenPad" />
         <module name="OneStatementPerLine"/>
         <module name="MultipleVariableDeclarations"/>
         <module name="ArrayTypeStyle"/>