mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
Simplify reversed-order adding to loaderPath
This commit is contained in:
parent
f86cd2d3a7
commit
8d0431e47f
@ -487,10 +487,8 @@ public class URLClassPath {
|
||||
*/
|
||||
private void push(URL[] urls) {
|
||||
synchronized (path) {
|
||||
// URLs will be consumed tail-first
|
||||
for (int i = urls.length - 1; i >= 0; --i) {
|
||||
loaderPath.addLast(urls[i]);
|
||||
}
|
||||
// Adding in reversed order since URLs are consumed tail-first
|
||||
loaderPath.addAll(Arrays.asList(urls).reversed());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user