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
On Sun, 14 Mar 2021 19:35:25 GMT, Сергей Цыпанов
wrote:
>> In some cases wrapping of `InputStream` with `BufferedInputStream` is
>> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which
>> does not require any buffer having one within.
>>
>> Other cases are related to readi
On Sun, 14 Mar 2021 19:35:25 GMT, Сергей Цыпанов
wrote:
>> In some cases wrapping of `InputStream` with `BufferedInputStream` is
>> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which
>> does not require any buffer having one within.
>>
>> Other cases are related to readi
> In some cases wrapping of `InputStream` with `BufferedInputStream` is
> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which does
> not require any buffer having one within.
>
> Other cases are related to reading either a byte or short `byte[]`: in both
> cases `BufferedIn
On Sun, 14 Mar 2021 17:40:27 GMT, Alan Bateman wrote:
>> It turned out, that with this latest update some of tier2_tools tests are
>> failing, e.g. `JLinkNegativeTest`:
>> test JLinkNegativeTest.testMalformedJmod(): failure
>> java.lang.AssertionError: Output does not fit regexp: Error:
>> java
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
On Sun, 14 Mar 2021 17:34:12 GMT, Сергей Цыпанов
wrote:
>> src/java.base/share/classes/jdk/internal/jmod/JmodFile.java line 58:
>>
>>> 56: byte[] magic = in.readNBytes(4);
>>> 57: if (magic.length != 4) {
>>> 58: throw new IOException("Header expected to
On Sun, 14 Mar 2021 11:16:13 GMT, Alan Bateman wrote:
>> Сергей Цыпанов has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Revert usage of InputStream.readNBytes()
>
> src/java.base/share/classes/jdk/internal/jmod/JmodFile.java line 58:
>
> In some cases wrapping of `InputStream` with `BufferedInputStream` is
> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which does
> not require any buffer having one within.
>
> Other cases are related to reading either a byte or short `byte[]`: in both
> cases `BufferedIn
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
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
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
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
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
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
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
In some cases wrapping of `InputStream` with `BufferedInputStream` is
redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which does
not require any buffer having one within.
Other cases are related to reading either a byte or short `byte[]`: in both
cases `BufferedInputStream.fi
On Sat, 13 Mar 2021 22:29:23 GMT, Сергей Цыпанов
wrote:
> In some cases wrapping of `InputStream` with `BufferedInputStream` is
> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which does
> not require any buffer having one within.
>
> Other cases are related to reading ei
On Sun, 14 Mar 2021 07:51:24 GMT, Alan Bateman wrote:
>> In some cases wrapping of `InputStream` with `BufferedInputStream` is
>> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which
>> does not require any buffer having one within.
>>
>> Other cases are related to reading
On Fri, 12 Mar 2021 09:52:13 GMT, Jonathan Dowland wrote:
> This is an adaptation of a patch originally written by Shafi Ahmad in
> a comment on the JBS page but never submitted or merged.
>
> With -Xcheck:jni, the method java.net.NetworkInterface.getAll very
> quickly breaches the default JNI l
20 matches
Mail list logo