diff options
author | 2015-11-24 21:14:01 +0000 | |
---|---|---|
committer | 2015-11-25 10:00:24 +0000 | |
commit | 85ccde3cc26d7e4a29135668b5c623cf684ec07f (patch) | |
tree | 4ffb9ae87932bede06e8eff06843495997a710b0 /src/main/java/com/google/devtools | |
parent | 528a9193396ce90e64a4847f6d7f24033cdd3634 (diff) |
Avoid low-value boxing of longs in AbstractQueueVisitor
Reduces garbage.
--
MOS_MIGRATED_REVID=108641543
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/concurrent/AbstractQueueVisitor.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/concurrent/AbstractQueueVisitor.java b/src/main/java/com/google/devtools/build/lib/concurrent/AbstractQueueVisitor.java index 496160979a..ab04d86428 100644 --- a/src/main/java/com/google/devtools/build/lib/concurrent/AbstractQueueVisitor.java +++ b/src/main/java/com/google/devtools/build/lib/concurrent/AbstractQueueVisitor.java @@ -419,8 +419,7 @@ public class AbstractQueueVisitor implements QuiescingExecutor { long tasks = remainingTasks.incrementAndGet(); Preconditions.checkState( tasks > 0, - "Incrementing remaining tasks counter resulted in impossible non-positive number %s", - tasks); + "Incrementing remaining tasks counter resulted in impossible non-positive number."); executeRunnable(wrapRunnable(runnable, ranTask)); } catch (Throwable e) { if (!ranTask.get()) { @@ -534,9 +533,7 @@ public class AbstractQueueVisitor implements QuiescingExecutor { // and the zeroRemainingTasks condition object notified if that condition is obtained. long tasks = remainingTasks.decrementAndGet(); Preconditions.checkState( - tasks >= 0, - "Decrementing remaining tasks counter resulted in impossible negative number %s", - tasks); + tasks >= 0, "Decrementing remaining tasks counter resulted in impossible negative number."); if (tasks == 0) { synchronized (zeroRemainingTasks) { zeroRemainingTasks.notify(); |