Sonar vulnerabilty fix
Issue-ID: APPC-1498
Change-Id: I29de3443a5a96c4d4bc5c7bab24b4fdb7f3358d3
Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
* ================================================================================
* 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
* 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
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.concurrent.atomic.AtomicBoolean;
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
/**
* This class is used as a "wrapper" for any closeable elements that are cached in a pool. It is
public class CachedElement<T extends Closeable>
implements Closeable, InvocationHandler, CacheManagement {
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
/**
* The pool that is managing this cached element
try {
pool.release((T) this);
} catch (PoolDrainedException e) {
try {
pool.release((T) this);
} catch (PoolDrainedException e) {
+ LOG.error("Pool is empty", e);