Skip to content

Commit 10c64d9

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Internal change.
PiperOrigin-RevId: 688529810
1 parent 3d14f1d commit 10c64d9

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import com.google.common.annotations.GwtCompatible;
2525
import com.google.common.annotations.GwtIncompatible;
2626
import java.time.Duration;
27-
import java.util.EnumSet;
2827
import java.util.concurrent.Callable;
2928
import java.util.concurrent.CountDownLatch;
3029
import java.util.concurrent.ExecutorService;
@@ -104,7 +103,7 @@ public void testAutoIncrementStep_resetToZero() {
104103
assertEquals(10, ticker.read());
105104
assertEquals(20, ticker.read());
106105

107-
for (TimeUnit timeUnit : EnumSet.allOf(TimeUnit.class)) {
106+
for (TimeUnit timeUnit : TimeUnit.values()) {
108107
ticker.setAutoIncrementStep(0, timeUnit);
109108
assertEquals(
110109
"Expected no auto-increment when setting autoIncrementStep to 0 " + timeUnit,

android/guava-testlib/test/com/google/common/testing/ReflectionFreeAssertThrows.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
import com.google.common.base.Predicate;
2323
import com.google.common.base.VerifyException;
2424
import com.google.common.collect.ImmutableMap;
25-
import com.google.common.util.concurrent.ExecutionError;
26-
import com.google.common.util.concurrent.UncheckedExecutionException;
2725
import com.google.errorprone.annotations.CanIgnoreReturnValue;
2826
import java.lang.reflect.InvocationTargetException;
2927
import java.nio.charset.UnsupportedCharsetException;
@@ -134,7 +132,6 @@ ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> exceptions() {
134132
.put(
135133
ConcurrentModificationException.class,
136134
e -> e instanceof ConcurrentModificationException)
137-
.put(ExecutionError.class, e -> e instanceof ExecutionError)
138135
.put(ExecutionException.class, e -> e instanceof ExecutionException)
139136
.put(IllegalArgumentException.class, e -> e instanceof IllegalArgumentException)
140137
.put(IllegalStateException.class, e -> e instanceof IllegalStateException)
@@ -144,7 +141,6 @@ ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> exceptions() {
144141
.put(NumberFormatException.class, e -> e instanceof NumberFormatException)
145142
.put(RuntimeException.class, e -> e instanceof RuntimeException)
146143
.put(TimeoutException.class, e -> e instanceof TimeoutException)
147-
.put(UncheckedExecutionException.class, e -> e instanceof UncheckedExecutionException)
148144
.put(UnsupportedCharsetException.class, e -> e instanceof UnsupportedCharsetException)
149145
.put(UnsupportedOperationException.class, e -> e instanceof UnsupportedOperationException)
150146
.put(VerifyException.class, e -> e instanceof VerifyException)

guava-testlib/test/com/google/common/testing/FakeTickerTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import com.google.common.annotations.GwtCompatible;
2525
import com.google.common.annotations.GwtIncompatible;
2626
import java.time.Duration;
27-
import java.util.EnumSet;
2827
import java.util.concurrent.Callable;
2928
import java.util.concurrent.CountDownLatch;
3029
import java.util.concurrent.ExecutorService;
@@ -102,7 +101,7 @@ public void testAutoIncrementStep_resetToZero() {
102101
assertEquals(10, ticker.read());
103102
assertEquals(20, ticker.read());
104103

105-
for (TimeUnit timeUnit : EnumSet.allOf(TimeUnit.class)) {
104+
for (TimeUnit timeUnit : TimeUnit.values()) {
106105
ticker.setAutoIncrementStep(0, timeUnit);
107106
assertEquals(
108107
"Expected no auto-increment when setting autoIncrementStep to 0 " + timeUnit,

guava-testlib/test/com/google/common/testing/ReflectionFreeAssertThrows.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
import com.google.common.base.Predicate;
2323
import com.google.common.base.VerifyException;
2424
import com.google.common.collect.ImmutableMap;
25-
import com.google.common.util.concurrent.ExecutionError;
26-
import com.google.common.util.concurrent.UncheckedExecutionException;
2725
import com.google.errorprone.annotations.CanIgnoreReturnValue;
2826
import java.lang.reflect.InvocationTargetException;
2927
import java.nio.charset.UnsupportedCharsetException;
@@ -134,7 +132,6 @@ ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> exceptions() {
134132
.put(
135133
ConcurrentModificationException.class,
136134
e -> e instanceof ConcurrentModificationException)
137-
.put(ExecutionError.class, e -> e instanceof ExecutionError)
138135
.put(ExecutionException.class, e -> e instanceof ExecutionException)
139136
.put(IllegalArgumentException.class, e -> e instanceof IllegalArgumentException)
140137
.put(IllegalStateException.class, e -> e instanceof IllegalStateException)
@@ -144,7 +141,6 @@ ImmutableMap<Class<? extends Throwable>, Predicate<Throwable>> exceptions() {
144141
.put(NumberFormatException.class, e -> e instanceof NumberFormatException)
145142
.put(RuntimeException.class, e -> e instanceof RuntimeException)
146143
.put(TimeoutException.class, e -> e instanceof TimeoutException)
147-
.put(UncheckedExecutionException.class, e -> e instanceof UncheckedExecutionException)
148144
.put(UnsupportedCharsetException.class, e -> e instanceof UnsupportedCharsetException)
149145
.put(UnsupportedOperationException.class, e -> e instanceof UnsupportedOperationException)
150146
.put(VerifyException.class, e -> e instanceof VerifyException)

0 commit comments

Comments
 (0)