Some very simple improvements regarding ArrayList

This commit is contained in:
stsypanov
2019-02-14 18:31:27 +02:00
committed by Juergen Hoeller
parent 5e0cd9fb60
commit 92053bb84e
4 changed files with 12 additions and 11 deletions

View File

@@ -138,8 +138,9 @@ abstract class AbstractJCacheOperation<A extends Annotation> implements JCacheOp
private static List<CacheParameterDetail> initializeAllParameterDetails(Method method) {
List<CacheParameterDetail> result = new ArrayList<>();
for (int i = 0; i < method.getParameterCount(); i++) {
int parameterCount = method.getParameterCount();
List<CacheParameterDetail> result = new ArrayList<>(parameterCount);
for (int i = 0; i < parameterCount; i++) {
CacheParameterDetail detail = new CacheParameterDetail(method, i);
result.add(detail);
}