Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Alan Bateman
On Sun, 14 Mar 2021 17:26:07 GMT, Alan Bateman wrote: >> Looks like it's never specified in JavaDoc which particular implementation >> of List is used in fields of affected classes, so it's quite odd to me that >> someone would rely on that when using reflection. But your point about >> backwa

RFR: 8263556: remove `@modules java.base` from tests

2021-03-14 Thread Igor Ignatyev
Hi all, could you please review this trivial cleanup? from JBS: > jtreg `@modules X` directive does two things: > - exclude a test from execution if JDK under test doesn't have module X > - if JDK under test has module X, make sure it's resolved > > both these things have no sense for `java

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Сергей Цыпанов
On Sun, 14 Mar 2021 17:26:07 GMT, Alan Bateman wrote: >> Looks like it's never specified in JavaDoc which particular implementation >> of List is used in fields of affected classes, so it's quite odd to me that >> someone would rely on that when using reflection. But your point about >> backwa

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Alan Bateman
On Sun, 14 Mar 2021 17:18:11 GMT, Сергей Цыпанов wrote: >> If that's the only use case, I recommend changing the return type to a >> deque, and replace the linked list with an array deque instead (as done >> elsewhere in this pr) > > Looks like it's never specified in JavaDoc which particular

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Сергей Цыпанов
On Sun, 14 Mar 2021 15:02:03 GMT, liach wrote: >> src/java.base/share/classes/jdk/internal/loader/URLClassPath.java line 220: >> >>> 218: return Collections.emptyList(); >>> 219: } >>> 220: List result = new ArrayList<>(); >> >> We'd better be cautious about this re

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread liach
On Sun, 14 Mar 2021 14:58:11 GMT, Yi Yang wrote: >> The usage of `LinkedList` is senseless and can be replaced with either >> `ArrayList` or `ArrayDeque` which are both more compact and effective. >> >> jdk:tier1 and jdk:tier2 are both ok > > src/java.base/share/classes/jdk/internal/loader/URLC

RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Сергей Цыпанов
The usage of `LinkedList` is senseless and can be replaced with either `ArrayList` or `ArrayDeque` which are both more compact and effective. jdk:tier1 and jdk:tier2 are both ok - Commit messages: - Remove remaining usages of LinkedList in java.base Changes: https://git.openjdk.ja

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Сергей Цыпанов
On Fri, 26 Feb 2021 15:32:57 GMT, liach wrote: > Are linked lists worse for addition even in cases where addition to array > list or deque requires resize and copying? i thought that's the advantage of > linked list. As far as I know `LinkedList` is always worse than `ArrayList` and discourag

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread Yi Yang
On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов wrote: > The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok src/java.base/share/classes/jdk/internal/loader/URL

Re: RFR: 8263561: Re-examine uses of LinkedList

2021-03-14 Thread liach
On Fri, 26 Feb 2021 10:48:33 GMT, Сергей Цыпанов wrote: > The usage of `LinkedList` is senseless and can be replaced with either > `ArrayList` or `ArrayDeque` which are both more compact and effective. > > jdk:tier1 and jdk:tier2 are both ok Are linked lists worse for addition even in cases w

Re: RFR: 8189198: Add "forRemoval = true" to Applet API deprecations

2021-03-14 Thread Alan Bateman
On Sat, 13 Mar 2021 00:43:33 GMT, Alexander Matveev wrote: >> implementation of >> JDK-8256145: JEP 398: Deprecate the Applet API for Removal > > Marked as reviewed by almatvee (Committer). Have you looked at narrowing the use of the SuppressWarnings to local variable declarations to avoid add