On Sat, 21 Feb 2026 08:41:06 GMT, Alan Bateman <[email protected]> wrote:

> It looks okay but fragile in the sense that ArrayDeque is widely used, it's 
> just a question on when rather if it will be loaded. 

Understood. My goal here and with the preceding ones in `ZipFile` and 
`URLClassPath` was to remove ArrayDeque from startup of a simple `java -cp 
file.jar` program. No plans to go hunting for more after this.   

Specifically for this change: Do you have any sense if `new ArrayList()` would 
be beneficial here, given that ArrayLIst provides lazy initialization of the 
elements array while ArrayDeque does not and allocates 17 elements per default 
constructor?

In other words, is it common for this stack to be empty?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29432#discussion_r2836034908

Reply via email to