Fix checkstyle if-statements must use braces yang-jmx-generator-plugin 08/13508/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:48:37 +0000 (17:48 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 9 Dec 2014 22:48:37 +0000 (17:48 -0500)
Change-Id: Ic3411f453bea29817e0c637423059efa6d398e93
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/JMXGenerator.java
opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/GeneralClassTemplate.java
opendaylight/config/yang-jmx-generator-plugin/src/main/java/org/opendaylight/controller/config/yangjmxgenerator/plugin/ftl/TemplateFactory.java

index 3cbbb28ab4f270e02f7344dc852252f0559b67e7..9ad8d2826f81e444e6cbf4efaea6d31be3bb3bc9 100644 (file)
@@ -253,9 +253,10 @@ public class JMXGenerator implements CodeGenerator {
     public void setMavenProject(MavenProject project) {
         this.projectBaseDir = project.getBasedir();
 
-        if (LOG != null)
+        if (LOG != null) {
             LOG.debug(getClass().getCanonicalName(), " project base dir: ",
                     projectBaseDir);
+        }
     }
 
     @VisibleForTesting
index 1576c9ddb0b117cfd96117e62cbea8f324ad37a7..3f4917f2ffcc3bab9fb7014d763aa9b0ccdb87da 100644 (file)
@@ -38,9 +38,10 @@ public class GeneralClassTemplate extends AbstractFtlTemplate {
     }
 
     static List<String> checkCardinality(List<String> extendedClass) {
-        if (extendedClass.size() > 1)
+        if (extendedClass.size() > 1) {
             throw new IllegalArgumentException(
                     "Class cannot have more than one super " + "class");
+        }
         return extendedClass;
     }
 
index 942def02c03a3c44b00cce93a77bd7acde0f69bc..53ab4ef335973029568f0820968c830d59112f17 100644 (file)
@@ -166,10 +166,11 @@ public class TemplateFactory {
                 Lists.<MethodDeclaration> newArrayList());
         sieTemplate.setJavadoc(sie.getNullableDescription());
 
-        if (sie.getNullableDescription() != null)
+        if (sie.getNullableDescription() != null) {
             sieTemplate.getAnnotations().add(
                     Annotation.createDescriptionAnnotation(sie
                             .getNullableDescription()));
+        }
         sieTemplate.getAnnotations().addAll(Annotation.createSieAnnotations(sie));
 
         return sieTemplate;
@@ -223,10 +224,11 @@ public class TemplateFactory {
                 attrProcessor.getMethods(), generateRuntime,
                 registratorFullyQualifiedName);
 
-        if (mbe.getNullableDescription() != null)
+        if (mbe.getNullableDescription() != null) {
             abstractModuleTemplate.getAnnotations().add(
                     Annotation.createDescriptionAnnotation(mbe
                             .getNullableDescription()));
+        }
         return abstractModuleTemplate;
     }
 
@@ -687,8 +689,9 @@ public class TemplateFactory {
 
 
     private static boolean needsDepResolver(AttributeIfc value) {
-        if(value instanceof TOAttribute)
+        if(value instanceof TOAttribute) {
             return true;
+        }
         if(value instanceof ListAttribute) {
             AttributeIfc innerAttribute = ((ListAttribute) value).getInnerAttribute();
             return needsDepResolver(innerAttribute);