Skip to content

Commit

Permalink
errorprone :: ConstantField for PickupQueue (#982)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-mlb authored Oct 18, 2024
1 parent 4ee0635 commit c97784e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/emissary/pickup/PickupQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class PickupQueue {
* MAX_QUE_SIZE huge because then we use too much memory. Some feeds put stuff on the Que in blocks. If our que is a
* prime numbered size they cannot fill it completely, which will help prevent blocking maybe.
*/
private int MAX_QUE_SIZE = 19;
private int maxQueSize = 19;

/**
* Normal pickup queue creation
Expand All @@ -37,7 +37,7 @@ public PickupQueue() {}
* @param maxSize the maximum size the queue can grow to
*/
public PickupQueue(int maxSize) {
MAX_QUE_SIZE = maxSize;
maxQueSize = maxSize;
}

/**
Expand Down Expand Up @@ -109,6 +109,6 @@ public synchronized WorkBundle deque() {
* @return true iff there is room for num items
*/
public boolean canHold(int num) {
return getQueSize() + num <= MAX_QUE_SIZE;
return getQueSize() + num <= maxQueSize;
}
}

0 comments on commit c97784e

Please sign in to comment.