Address security vulnerabilities (fix 2)
[aai/champ.git] / src / main / java / org / onap / aai / champ / event / AbstractLoggingChampGraph.java
index cb2f5a7..16fc00b 100644 (file)
@@ -2,8 +2,8 @@
  * ============LICENSE_START==========================================
  * org.onap.aai
  * ===================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017 Amdocs
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
  * ===================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END============================================
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
 package org.onap.aai.champ.event;
 
@@ -106,18 +105,18 @@ public abstract class AbstractLoggingChampGraph implements ChampGraph {
   /** Configuration property for setting the number of events that we will try to 'batch' 
    *  up before sending them to the event bus. */
   public static final String  PARAM_EVENT_STREAM_BATCH_SIZE = "champ.event.stream.batch-size";
-  public final static Integer DEFAULT_EVENT_STREAM_BATCH_SIZE = 1;
+  public static final Integer DEFAULT_EVENT_STREAM_BATCH_SIZE = 1;
   
   /** Configuration property for setting the maximum amount of time to wait for a batch of
    *  outgoing messages to fill up before sending the batch. */
   public static final String  PARAM_EVENT_STREAM_BATCH_TIMEOUT = "champ.event.stream.batch-timeout";
-  public final static Integer DEFAULT_EVENT_STREAM_BATCH_TIMEOUT_MS = 500; 
+  public static final Integer DEFAULT_EVENT_STREAM_BATCH_TIMEOUT_MS = 500; 
   
-  public final static String  PARAM_EVENT_STREAM_PUBLISHER_POOL_SIZE = "champ.event.stream.publisher-pool-size";
+  public static final String  PARAM_EVENT_STREAM_PUBLISHER_POOL_SIZE = "champ.event.stream.publisher-pool-size";
   public static final Integer DEFAULT_EVENT_STREAM_PUBLISHER_POOL_SIZE = 100;
   
   /** The event stream topic that we will publish Champ events to. */
-  public final static String EVENT_TOPIC = "champRawEvents";
+  public static final String EVENT_TOPIC = "champRawEvents";
     
   /** Number of events to 'batch up' before actually publishing them to the event bus. */
   private Integer eventStreamBatchSize;
@@ -270,7 +269,7 @@ public abstract class AbstractLoggingChampGraph implements ChampGraph {
       objectToDelete = retrieveObject(key);
       
     } catch (ChampUnmarshallingException e) {
-      logger.error("Unable to generate delete object log: " + e.getMessage());
+      logger.error("Unable to generate delete object log: " + e.getMessage(),e);
     }
     
     executeDeleteObject(key);
@@ -439,10 +438,10 @@ public abstract class AbstractLoggingChampGraph implements ChampGraph {
       publisherPool.execute(new EventPublisher(anEvent));
     
     } catch (RejectedExecutionException re) {
-      logger.error("Event could not be published to the event bus due to: " + re.getMessage());
+      logger.error("Event could not be published to the event bus due to: " + re.getMessage(),re);
       
     } catch (NullPointerException npe) {
-      logger.error("Can not publish null event to event bus.");
+      logger.error("Can not publish null event to event bus." + npe.getMessage(),npe);
     }
   }