aboutsummaryrefslogtreecommitdiffstats
path: root/appc-core
diff options
context:
space:
mode:
authorJegadeesh Babu <jegabab1@in.ibm.com>2019-02-26 16:33:35 +0530
committerTakamune Cho <takamune.cho@att.com>2019-02-26 15:19:58 +0000
commit3ac3a0198de40e83f0c1a45468f84870c08019b8 (patch)
treebe9d5093c8a4ee806c3ec36520e8f9af9addfca4 /appc-core
parente87a189e91adfa04482363a9057c4a24fe1b03bd (diff)
Added logger statement
Sonar vulnerabilty fix Issue-ID: APPC-1498 Change-Id: I29de3443a5a96c4d4bc5c7bab24b4fdb7f3358d3 Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
Diffstat (limited to 'appc-core')
-rw-r--r--appc-core/appc-common-bundle/src/main/java/org/onap/appc/pool/CachedElement.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/appc-core/appc-common-bundle/src/main/java/org/onap/appc/pool/CachedElement.java b/appc-core/appc-common-bundle/src/main/java/org/onap/appc/pool/CachedElement.java
index e9b2ffeae..093ce10bc 100644
--- a/appc-core/appc-common-bundle/src/main/java/org/onap/appc/pool/CachedElement.java
+++ b/appc-core/appc-common-bundle/src/main/java/org/onap/appc/pool/CachedElement.java
@@ -6,6 +6,8 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
+ * Modifications Copyright (C) 2019 IBM
+ * =============================================================================
* 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
@@ -29,6 +31,8 @@ import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.concurrent.atomic.AtomicBoolean;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
/**
* This class is used as a "wrapper" for any closeable elements that are cached in a pool. It is
@@ -42,6 +46,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
public class CachedElement<T extends Closeable>
implements Closeable, InvocationHandler, CacheManagement {
+ private static final EELFLogger LOG = EELFManager.getInstance().getLogger(CachedElement.class);
/**
* The pool that is managing this cached element
@@ -116,7 +121,7 @@ public class CachedElement<T extends Closeable>
try {
pool.release((T) this);
} catch (PoolDrainedException e) {
- e.printStackTrace();
+ LOG.error("Pool is empty", e);
}
}