Only log if logging level is enabled
This commit is contained in:
parent
54559a9595
commit
e719f23f7d
@ -51,7 +51,9 @@ public final class QueueFactory {
|
||||
//
|
||||
// This mostly happens because of a custom classloader or security policy that did not allow us to access the
|
||||
// com.sun.Unmisc class. So just log it and fallback to the old LegacyLinkedTransferQueue that works in all cases
|
||||
LOGGER.debug("Unable to instance LinkedTransferQueue, fallback to LegacyLinkedTransferQueue", t);
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("Unable to instance LinkedTransferQueue, fallback to LegacyLinkedTransferQueue", t);
|
||||
}
|
||||
}
|
||||
|
||||
return new LegacyLinkedTransferQueue<T>();
|
||||
@ -75,7 +77,9 @@ public final class QueueFactory {
|
||||
//
|
||||
// This mostly happens because of a custom classloader or security policy that did not allow us to access the
|
||||
// com.sun.Unmisc class. So just log it and fallback to the old LegacyLinkedTransferQueue that works in all cases
|
||||
LOGGER.debug("Unable to instance LinkedTransferQueue, fallback to LegacyLinkedTransferQueue", t);
|
||||
if (LOGGER.isDebugEnabled()) {
|
||||
LOGGER.debug("Unable to instance LinkedTransferQueue, fallback to LegacyLinkedTransferQueue", t);
|
||||
}
|
||||
}
|
||||
|
||||
return new LegacyLinkedTransferQueue<T>(collection);
|
||||
|
Loading…
Reference in New Issue
Block a user