|
43 | 43 | import java.util.Map; |
44 | 44 | import java.util.Map.Entry; |
45 | 45 | import java.util.Set; |
46 | | -import java.util.Vector; |
47 | 46 | import java.util.WeakHashMap; |
48 | 47 | import java.util.concurrent.ConcurrentHashMap; |
49 | 48 | import java.util.concurrent.ConcurrentMap; |
@@ -444,33 +443,33 @@ private String toSclResourceName(String name) { |
444 | 443 | // * We need to return an enumeration. |
445 | 444 | // * We can't make one on the fly. |
446 | 445 | // * ArrayList can't make these. |
447 | | - Vector<URL> vector = new Vector<URL>(); |
| 446 | + List<URL> urls = new ArrayList<>(); |
448 | 447 |
|
449 | 448 | for (File ce : override) { |
450 | 449 | URL url = getResourceFromLocation(name, altName, ce); |
451 | | - if (url != null) vector.add(url); |
| 450 | + if (url != null) urls.add(url); |
452 | 451 | } |
453 | 452 |
|
454 | 453 | if (override.isEmpty()) { |
455 | 454 | URL fromSelf = getResourceFromLocation(name, altName, SELF_BASE_FILE); |
456 | | - if (fromSelf != null) vector.add(fromSelf); |
| 455 | + if (fromSelf != null) urls.add(fromSelf); |
457 | 456 | } |
458 | 457 |
|
459 | 458 | Enumeration<URL> sec = super.getResources(name); |
460 | 459 | while (sec.hasMoreElements()) { |
461 | 460 | URL item = sec.nextElement(); |
462 | | - if (isPartOfShadowSuffix(item.toString(), name, sclSuffix)) vector.add(item); |
| 461 | + if (isPartOfShadowSuffix(item.toString(), name, sclSuffix)) urls.add(item); |
463 | 462 | } |
464 | 463 |
|
465 | 464 | if (altName != null) { |
466 | 465 | Enumeration<URL> tern = super.getResources(altName); |
467 | 466 | while (tern.hasMoreElements()) { |
468 | 467 | URL item = tern.nextElement(); |
469 | | - if (isPartOfShadowSuffix(item.toString(), altName, sclSuffix)) vector.add(item); |
| 468 | + if (isPartOfShadowSuffix(item.toString(), altName, sclSuffix)) urls.add(item); |
470 | 469 | } |
471 | 470 | } |
472 | 471 |
|
473 | | - return vector.elements(); |
| 472 | + return Collections.enumeration(urls); |
474 | 473 | } |
475 | 474 |
|
476 | 475 | @Override public URL getResource(String name) { |
|
0 commit comments