Fix Bugs Identified by Sonar 05/34705/1
authorGuangrongFu <fu.guangrong@zte.com.cn>
Thu, 8 Mar 2018 08:58:43 +0000 (16:58 +0800)
committerGuangrongFu <fu.guangrong@zte.com.cn>
Thu, 8 Mar 2018 08:58:43 +0000 (16:58 +0800)
Change-Id: I42d0323a95637a5b5c2c16a61f3b548d36182bee
Issue-ID: HOLMES-118
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
holmes-actions/src/main/java/org/onap/holmes/common/api/stat/VesAlarm.java
holmes-actions/src/main/java/org/onap/holmes/common/dropwizard/ioc/bundle/AutoConfigBundle.java

index ead8464..ae71ad4 100644 (file)
@@ -29,7 +29,8 @@ public class VesAlarm implements Cloneable, Serializable{
     private String eventId;
     private String eventName;
     private String eventType;
-    private Object internalHeaderFields;
+    //Temporarily make it transient cuz no details of this field is provided and it is not used for now.
+    transient private Object internalHeaderFields;
     private Long lastEpochMicrosec;
     private String nfcNamingCode;
     private String nfNamingCode;
index b8552b2..db4f341 100644 (file)
@@ -58,7 +58,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * complete the integration of hK2 container and dropwizard
- * 
+ *
  * @author hu.rui
  *
  */
@@ -276,12 +276,9 @@ public class AutoConfigBundle<T extends Configuration> implements ConfiguredBund
         bind(configuration);
         LOG.info("Registering Dropwizard Configuration class name:{}",
             configuration.getClass().getName());
-        if (configuration instanceof Configuration) {
           bind((Configuration) configuration).to(Configuration.class);
           LOG.info("Registering Dropwizard Configuration class name:{}",
               Configuration.class.getName());
-        }
-
       }
     });