Package-private members in java.util.ArrayList

2021-05-09 Thread Zheka Kozlov
Hi! JEP 181 (Nestmates) was implemented in Java 11, however, there are still many library classes with members that were declared package-private to avoid synthetic bridge methods. For example, ArrayList and its friends have the following declarations: • transient Object[] elementData; //

Re: RFR: 8266610: Method RandomAccessFile#length() returns 0 for block devices on linux. [v2]

2021-05-09 Thread Vyom Tewari
On Fri, 7 May 2021 12:17:11 GMT, Vyom Tewari wrote: >> RandomAccessFile.length() method for block device return always 0 > > Vyom Tewari has updated the pull request incrementally with one additional > commit since the last revision: > > fixed assigning -1 to uint64_t I am working on it. i

Re: Proposal for new interface: TimeSource

2021-05-09 Thread Aaron Scott-Boddendijk
Yes please. I often have people ask how they should solve exactly this problem and we have several code-bases that have their own implementations of essentially this interface. We've used it not only for the request-contextual time localisation but for controlling the stepping for

Re: RFR: 8266610: Method RandomAccessFile#length() returns 0 for block devices on linux. [v2]

2021-05-09 Thread David Holmes
On Mon, 10 May 2021 03:48:43 GMT, Vyom Tewari wrote: >>> Could required os = linux added for >>> test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java? As it is >>> decribed only run as linux. >> >> Yes, good idea. Also maybe we can see about changing it to avoid the >> dependency on

Re: RFR: 8266610: Method RandomAccessFile#length() returns 0 for block devices on linux. [v2]

2021-05-09 Thread Vyom Tewari
On Sun, 9 May 2021 06:26:13 GMT, Alan Bateman wrote: > Could required os = linux added for > test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java? As it is > decribed only run as linux. Sure, this is separate issue(https://bugs.openjdk.java.net/browse/JDK-8150539). We will fix it

Integrated: 8266610: Method RandomAccessFile#length() returns 0 for block devices on linux.

2021-05-09 Thread Vyom Tewari
On Fri, 7 May 2021 06:16:07 GMT, Vyom Tewari wrote: > RandomAccessFile.length() method for block device return always 0 This pull request has now been integrated. Changeset: 69b96f9a Author:Vyom Tewari URL:

Re: New convenience methods on Stream

2021-05-09 Thread dfranken . jdk
>From my own limited experience, I've seen .collect(Supplier) often when an explicitly mutable collection is needed, such as with ArrayList::new or HashSet::new. Even though you could in theory use Stream.toList() for the ArrayList version, I don't think this is advisable as toList isn't

Re: RFR: 8264777: Overload optimized FileInputStream::readAllBytes [v6]

2021-05-09 Thread Alan Bateman
On Thu, 6 May 2021 16:40:31 GMT, Brian Burkhalter wrote: >> Please consider this request to override the `java.io.InputStream` methods >> `readAllBytes()` and `readNBytes(int)` in `FileInputStream` with more >> performant implementations. The method overrides attempt to read all >> requested

Re: RFR: 8265448: (zipfs): Reduce read contention in ZipFileSystem [v5]

2021-05-09 Thread Alan Bateman
On Fri, 7 May 2021 03:10:32 GMT, Jason Zaugg wrote: >> If the given Path represents a file, use the overload of read defined >> in FileChannel that accepts an explicit position and avoid serializing >> reads. >> >> Note: The underlying NIO implementation is not required to implement >>

Re: RFR: 8266013: Unexpected replacement character handling on stateful CharsetEncoder [v2]

2021-05-09 Thread Ichiroh Takiguchi
On Fri, 30 Apr 2021 16:11:30 GMT, Ichiroh Takiguchi wrote: >> When an invalid character is converted by getBytes() method, the character >> is converted to replacement byte data. >> Shift code (SO/SI) may not be added into right place by EBCDIC Mix charset. >> EBCDIC Mix charset encoder is

Re: RFR: 8265448: (zipfs): Reduce read contention in ZipFileSystem [v5]

2021-05-09 Thread Lance Andersen
On Fri, 7 May 2021 03:10:32 GMT, Jason Zaugg wrote: >> If the given Path represents a file, use the overload of read defined >> in FileChannel that accepts an explicit position and avoid serializing >> reads. >> >> Note: The underlying NIO implementation is not required to implement >>

Re: [External] : Re: ReversibleCollection proposal

2021-05-09 Thread dfranken . jdk
When I thought about Collection's role in the hierarchy, it seemed to me that 'Collection' is an interface for describing how elements are stored in a cardboard box (we can and and remove them) and that we might need a different, yet related, interface to describe how to retrieve the items from

Re: RFR: 8266610: Method RandomAccessFile#length() returns 0 for block devices on linux. [v2]

2021-05-09 Thread Alan Bateman
On Sun, 9 May 2021 03:38:49 GMT, Vyom Tewari wrote: > Could required os = linux added for > test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java? As it is > decribed only run as linux. Yes, good idea. Also maybe we can see about changing it to avoid the dependency on /dev/sda1.