From b5b22d4b01273b83e816520301001b79147c33c8 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 10 Sep 2015 23:25:59 -0400 Subject: [PATCH] Remove and forbid use of com.google.common.collect.Queues This commit removes and now forbids all uses of com.google.common.collect.Queues across the codebase. This is one of many steps in the eventual removal of Guava as a dependency. Relates #13224 --- .../java/org/elasticsearch/common/recycler/Recyclers.java | 6 +++--- dev-tools/src/main/resources/forbidden/core-signatures.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/common/recycler/Recyclers.java b/core/src/main/java/org/elasticsearch/common/recycler/Recyclers.java index daff885733a..5bac8f7bcfd 100644 --- a/core/src/main/java/org/elasticsearch/common/recycler/Recyclers.java +++ b/core/src/main/java/org/elasticsearch/common/recycler/Recyclers.java @@ -20,8 +20,8 @@ package org.elasticsearch.common.recycler; import com.carrotsearch.hppc.BitMixer; -import com.google.common.collect.Queues; -import org.elasticsearch.ElasticsearchException; + +import java.util.ArrayDeque; public enum Recyclers { ; @@ -44,7 +44,7 @@ public enum Recyclers { * Return a recycler based on a deque. */ public static Recycler deque(Recycler.C c, int limit) { - return new DequeRecycler<>(c, Queues.newArrayDeque(), limit); + return new DequeRecycler<>(c, new ArrayDeque<>(), limit); } /** diff --git a/dev-tools/src/main/resources/forbidden/core-signatures.txt b/dev-tools/src/main/resources/forbidden/core-signatures.txt index 4b0bc079a07..92792ca3ca3 100644 --- a/dev-tools/src/main/resources/forbidden/core-signatures.txt +++ b/dev-tools/src/main/resources/forbidden/core-signatures.txt @@ -98,3 +98,4 @@ com.google.common.base.Preconditions#checkNotNull(java.lang.Object) com.google.common.base.Preconditions#checkNotNull(java.lang.Object, java.lang.Object) com.google.common.base.Preconditions#checkNotNull(java.lang.Object, java.lang.String, java.lang.Object[]) com.google.common.collect.ImmutableSortedSet +com.google.common.collect.Queues