mirror of
https://github.com/google/guava.git
synced 2024-10-23 08:44:54 +08:00
Suppress Error Prone findings locally.
RELNOTES=n/a PiperOrigin-RevId: 664836848
This commit is contained in:
parent
55911e8432
commit
d6192739d0
@ -59,6 +59,7 @@ public class BigIntegerMathBenchmark {
|
||||
}
|
||||
|
||||
/** Returns the product of {@code n1} exclusive through {@code n2} inclusive. */
|
||||
@SuppressWarnings("UseCorrectAssertInTests") // TODO(b/345814817): Remove or convert assertion.
|
||||
private static BigInteger oldSlowFactorial(int n1, int n2) {
|
||||
assert n1 <= n2;
|
||||
if (IntMath.log2(n2, CEILING) * (n2 - n1) < Long.SIZE - 1) {
|
||||
|
@ -390,6 +390,8 @@ public abstract class ImmutableList<E> extends ImmutableCollection<E>
|
||||
}
|
||||
|
||||
/** A singleton implementation of iterator() for the empty ImmutableList. */
|
||||
// TODO(b/345814817): Move this to RegularImmutableList?
|
||||
@SuppressWarnings("ClassInitializationDeadlock")
|
||||
private static final UnmodifiableListIterator<Object> EMPTY_ITR =
|
||||
new Itr<Object>(RegularImmutableList.EMPTY, 0);
|
||||
|
||||
|
@ -429,6 +429,7 @@ public abstract class AbstractFuture<V extends @Nullable Object> extends Interna
|
||||
*
|
||||
* @throws CancellationException {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings("LabelledBreakTarget") // TODO(b/345814817): Maybe fix?
|
||||
@CanIgnoreReturnValue
|
||||
@Override
|
||||
@ParametricNullness
|
||||
|
@ -460,7 +460,10 @@ public final class Monitor {
|
||||
* @return whether the monitor was entered, which guarantees that the guard is now satisfied
|
||||
* @throws InterruptedException if interrupted while waiting
|
||||
*/
|
||||
@SuppressWarnings("GoodTime") // should accept a java.time.Duration
|
||||
@SuppressWarnings({
|
||||
"GoodTime", // should accept a java.time.Duration
|
||||
"LabelledBreakTarget", // TODO(b/345814817): Maybe fix.
|
||||
})
|
||||
public boolean enterWhen(Guard guard, long time, TimeUnit unit) throws InterruptedException {
|
||||
final long timeoutNanos = toSafeNanos(time, unit);
|
||||
if (guard.monitor != this) {
|
||||
|
@ -55,7 +55,8 @@ public abstract class ImmutableSortedSet<E> extends ForwardingImmutableSet<E>
|
||||
|
||||
private static final Comparator<?> NATURAL_ORDER = Ordering.natural();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
// TODO(b/345814817): Move this to RegularImmutableSortedSet?
|
||||
@SuppressWarnings({"unchecked", "ClassInitializationDeadlock"})
|
||||
private static final ImmutableSortedSet<Object> NATURAL_EMPTY_SET =
|
||||
new RegularImmutableSortedSet<Object>(
|
||||
new TreeSet<Object>((Comparator<Object>) NATURAL_ORDER), false);
|
||||
|
@ -59,6 +59,7 @@ public class BigIntegerMathBenchmark {
|
||||
}
|
||||
|
||||
/** Returns the product of {@code n1} exclusive through {@code n2} inclusive. */
|
||||
@SuppressWarnings("UseCorrectAssertInTests") // TODO(b/345814817): Remove or convert assertion.
|
||||
private static BigInteger oldSlowFactorial(int n1, int n2) {
|
||||
assert n1 <= n2;
|
||||
if (IntMath.log2(n2, CEILING) * (n2 - n1) < Long.SIZE - 1) {
|
||||
|
@ -429,6 +429,7 @@ public abstract class AbstractFuture<V extends @Nullable Object> extends Interna
|
||||
*
|
||||
* @throws CancellationException {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings("LabelledBreakTarget") // TODO(b/345814817): Maybe fix?
|
||||
@CanIgnoreReturnValue
|
||||
@Override
|
||||
@ParametricNullness
|
||||
|
@ -514,7 +514,10 @@ public final class Monitor {
|
||||
* @return whether the monitor was entered, which guarantees that the guard is now satisfied
|
||||
* @throws InterruptedException if interrupted while waiting
|
||||
*/
|
||||
@SuppressWarnings("GoodTime") // should accept a java.time.Duration
|
||||
@SuppressWarnings({
|
||||
"GoodTime", // should accept a java.time.Duration
|
||||
"LabelledBreakTarget", // TODO(b/345814817): Maybe fix.
|
||||
})
|
||||
public boolean enterWhen(Guard guard, long time, TimeUnit unit) throws InterruptedException {
|
||||
final long timeoutNanos = toSafeNanos(time, unit);
|
||||
if (guard.monitor != this) {
|
||||
|
Loading…
Reference in New Issue
Block a user