File tree 1 file changed +5
-4
lines changed
testing/src/main/java/io/grpc/testing
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 22
22
import com .google .common .annotations .VisibleForTesting ;
23
23
import com .google .common .base .Stopwatch ;
24
24
import com .google .common .base .Ticker ;
25
+ import com .google .common .collect .Lists ;
25
26
import io .grpc .ExperimentalApi ;
26
27
import io .grpc .ManagedChannel ;
27
28
import io .grpc .Server ;
@@ -170,8 +171,8 @@ protected void after() {
170
171
171
172
InterruptedException interrupted = null ;
172
173
if (!abruptShutdown ) {
173
- for (int i = resources . size () - 1 ; i >= 0 ; i -- ) {
174
- resources . get ( i ) .cleanUp ();
174
+ for (Resource resource : Lists . reverse ( resources ) ) {
175
+ resource .cleanUp ();
175
176
}
176
177
177
178
for (int i = resources .size () - 1 ; i >= 0 ; i --) {
@@ -190,8 +191,8 @@ protected void after() {
190
191
}
191
192
192
193
if (!resources .isEmpty ()) {
193
- for (int i = resources . size () - 1 ; i >= 0 ; i -- ) {
194
- resources . get ( i ) .forceCleanUp ();
194
+ for (Resource resource : Lists . reverse ( resources ) ) {
195
+ resource .forceCleanUp ();
195
196
}
196
197
197
198
try {
You can’t perform that action at this time.
0 commit comments