|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2023 the original author or authors. |
| 2 | + * Copyright 2002-2024 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -496,7 +496,7 @@ protected Resource[] findPathMatchingResources(String locationPattern) throws IO
|
496 | 496 | String rootDirPath = determineRootDir(locationPattern);
|
497 | 497 | String subPattern = locationPattern.substring(rootDirPath.length());
|
498 | 498 | Resource[] rootDirResources = getResources(rootDirPath);
|
499 |
| - Set<Resource> result = new LinkedHashSet<>(16); |
| 499 | + Set<Resource> result = new LinkedHashSet<>(64); |
500 | 500 | for (Resource rootDirResource : rootDirResources) {
|
501 | 501 | rootDirResource = resolveRootDirResource(rootDirResource);
|
502 | 502 | URL rootDirUrl = rootDirResource.getURL();
|
@@ -648,7 +648,7 @@ protected Set<Resource> doFindPathMatchingJarResources(Resource rootDirResource,
|
648 | 648 | // The Sun JRE does not return a slash here, but BEA JRockit does.
|
649 | 649 | rootEntryPath = rootEntryPath + "/";
|
650 | 650 | }
|
651 |
| - Set<Resource> result = new LinkedHashSet<>(8); |
| 651 | + Set<Resource> result = new LinkedHashSet<>(64); |
652 | 652 | for (Enumeration<JarEntry> entries = jarFile.entries(); entries.hasMoreElements();) {
|
653 | 653 | JarEntry entry = entries.nextElement();
|
654 | 654 | String entryPath = entry.getName();
|
@@ -864,7 +864,7 @@ private static class PatternVirtualFileVisitor implements InvocationHandler {
|
864 | 864 |
|
865 | 865 | private final String rootPath;
|
866 | 866 |
|
867 |
| - private final Set<Resource> resources = new LinkedHashSet<>(); |
| 867 | + private final Set<Resource> resources = new LinkedHashSet<>(64); |
868 | 868 |
|
869 | 869 | public PatternVirtualFileVisitor(String rootPath, String subPattern, PathMatcher pathMatcher) {
|
870 | 870 | this.subPattern = subPattern;
|
@@ -895,7 +895,6 @@ else if ("visit".equals(methodName)) {
|
895 | 895 | else if ("toString".equals(methodName)) {
|
896 | 896 | return toString();
|
897 | 897 | }
|
898 |
| - |
899 | 898 | throw new IllegalStateException("Unexpected method invocation: " + method);
|
900 | 899 | }
|
901 | 900 |
|
|
0 commit comments