RFR: Here are some URLClassPath patches
Martin Buchholz
martinrb at google.com
Wed Feb 21 19:53:50 UTC 2018
On Wed, Feb 21, 2018 at 7:48 AM, Roger Riggs <Roger.Riggs at oracle.com> wrote:
>
> 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.
>
There's a debate about whether using concrete types in the implementation
is clearer. I happen to think so. But in performance critical classes
the concrete class is more important to the maintainer (I'm thinking
"ArrayDeque" not "Deque" when I maintain this code), and is also likely to
help the JVM.
More information about the core-libs-dev
mailing list