RFR: Here are some URLClassPath patches

Roger Riggs Roger.Riggs at Oracle.com
Wed Feb 21 15:48:30 UTC 2018


Hi Martin,

Generally, I would leave code alone that does not have a good reason for 
changing.
That goes for commenting conventions (// vs /*) too.

On the style changes in URLClassPath-ArrayDeque, about declarations like:

ArrayList<URL> path = new ArrayList<>();

It had been a recommended style to use the abstract type (List) on the 
left hand side
and only use the concrete type where necessary.

But with the addition of 'var' local type inference, perhaps that would 
an option here.

(Not trying to start a style war).

$.02, Roger


On 2/21/2018 1:08 AM, Martin Buchholz wrote:
> At Google I spend a lot of time staring unproductively at classloader code,
> and it's always hard for me to resist the urge to clean it up.  So here are
> some patches that should be relatively uncontroversial, and may prepare for
> more radical changes later.
>
>
> 8198484: URLClassPath should use an ArrayDeque instead of a Stack
> http://cr.openjdk.java.net/~martin/webrevs/jdk/URLClassPath-ArrayDeque/
> https://bugs.openjdk.java.net/browse/JDK-8198484
>



More information about the core-libs-dev mailing list