Use Java 5 foreach for arrays for brevity at no cost
This commit is contained in:
parent
642f4bb3b1
commit
ddb6441212
@ -207,8 +207,8 @@ final class PoolThreadCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int numFreed = 0;
|
int numFreed = 0;
|
||||||
for (int i = 0; i < caches.length; i++) {
|
for (MemoryRegionCache<?> c: caches) {
|
||||||
numFreed += free(caches[i]);
|
numFreed += free(c);
|
||||||
}
|
}
|
||||||
return numFreed;
|
return numFreed;
|
||||||
}
|
}
|
||||||
@ -233,8 +233,8 @@ final class PoolThreadCache {
|
|||||||
if (caches == null) {
|
if (caches == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int i = 0; i < caches.length; i++) {
|
for (MemoryRegionCache<?> c: caches) {
|
||||||
trim(caches[i]);
|
trim(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user