- currentInflight.offer(e);
- LOG.debug("Enqueued request {} to queue {}", request, this);
+
+ if (currentInflight.offer(e)) {
+ LOG.debug("Enqueued request {} to queue {}", request, this);
+ } else {
+ // This shouldn't happen since the queue has unlimited capacity but check anyway to avoid FindBugs warning
+ // about checking return value.
+ LOG.warn("Fail to enqueued request {} to queue {}", request, this);
+ }