Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v13]

2022-11-24 Thread Per Minborg
On Thu, 24 Nov 2022 12:06:44 GMT, Alan Bateman wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove redundant method > > src/java.base/share/classes/sun/nio/ch/IOUtil.java l

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v14]

2022-11-24 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request incremen

Integrated: 8297150: Add a @sealedGraph tag to Reference

2022-11-24 Thread Per Minborg
On Wed, 16 Nov 2022 16:52:50 GMT, Per Minborg wrote: > This PR proposes to opt in for graphic rendering of the sealed hierarchy of > the `Reference` class. > > Rendering capability was added via https://bugs.openjdk.org/browse/JDK-8295653 > > Here is how it would look like

Integrated: 8297148: Add a @sealedGraph tag to CallSite

2022-11-26 Thread Per Minborg
On Wed, 16 Nov 2022 16:17:01 GMT, Per Minborg wrote: > This PR proposes to opt in for graphic rendering of the sealed hierarchy of > the CallSite class. > > Rendering capability was added via https://bugs.openjdk.org/browse/JDK-8295653 > > Here is how it would look like

Integrated: 8297145: Add a @sealedGraph tag to ConstantDesc

2022-11-26 Thread Per Minborg
On Wed, 16 Nov 2022 15:02:08 GMT, Per Minborg wrote: > This PR proposes to opt in for graphic rendering of the sealed hierarchy of > the ConstantDesc class. > > Rendering capability was added via https://bugs.openjdk.org/browse/JDK-8295653 > > > Here is how it would

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v14]

2022-11-28 Thread Per Minborg
On Thu, 24 Nov 2022 16:21:42 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances t

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v15]

2022-11-28 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request increm

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v16]

2022-11-28 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request incre

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v31]

2022-11-28 Thread Per Minborg
On Wed, 23 Nov 2022 17:33:06 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-434 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjd

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v16]

2022-11-28 Thread Per Minborg
On Mon, 28 Nov 2022 19:35:24 GMT, Paul Sandoz wrote: > I prefer methods that do not expose the scope implementation so access is > limited to just to the acquire/release methods, but i am unsure of the > performance implications. These methods might not reliably inline, and we may > need to en

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v17]

2022-11-29 Thread Per Minborg
be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rem

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v17]

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 09:40:58 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances t

Re: RFR: 8296024: Usage of DirectBuffer::address should be guarded [v18]

2022-12-06 Thread Per Minborg
be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The pull request now co

Integrated: 8296024: Usage of DirectBuffer::address should be guarded

2022-12-06 Thread Per Minborg
On Mon, 21 Nov 2022 10:53:07 GMT, Per Minborg wrote: > This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > a

RFR: 8298277: Replace "session" with "scope" for FFM access

2022-12-07 Thread Per Minborg
This PR suggests renaming various names from "session" to "scope" in accordance with https://openjdk.org/jeps/434 The PRs contains changes for several sub-components. - Commit messages: - Rename session to scope Changes: https://git.openjdk.org/jdk/pull/11573/files Webrev: https:

Re: RFR: 8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-08 Thread Per Minborg
> This PR suggests renaming various names from "session" to "scope" in > accordance with https://openjdk.org/jeps/434 > > The PRs contains changes for several sub-components. Per Minborg has updated the pull request incrementally with one additional commit si

Withdrawn: 8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Per Minborg
On Wed, 7 Dec 2022 21:55:43 GMT, Per Minborg wrote: > This PR suggests renaming various names from "session" to "scope" in > accordance with https://openjdk.org/jeps/434 > > The PRs contains changes for several sub-components. This pull request has been

Re: RFR: 8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-08 Thread Per Minborg
On Thu, 8 Dec 2022 08:17:44 GMT, Per Minborg wrote: >> This PR suggests renaming various names from "session" to "scope" in >> accordance with https://openjdk.org/jeps/434 >> >> The PRs contains changes for several sub-components. > > Per Minbo

RFR: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Per Minborg
This PR proposes changing variable names and text from "session" to "scope". The proposed changes are only for the FFM API and not other parts like the Vector API and test classes. - Commit messages: - Rename session to scope Changes: https://git.openjdk.org/jdk/pull/11593/files

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Per Minborg
On Thu, 8 Dec 2022 14:36:52 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/Binding.java line 255: >> >>> 253: * the context's allocator is accessed. >>> 254: */ >>> 255: public static Context ofScope() { >> >> I think `ofArena`

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-08 Thread Per Minborg
> This PR proposes changing variable names and text from "session" to "scope". > The proposed changes are only for the FFM API and not other parts like the > Vector API and test classes. Per Minborg has updated the pull request incrementally with one additional c

RFR: 8298532: Declare private constructors for FFM internal Architecture implementations

2022-12-12 Thread Per Minborg
This PR proposes declaring `AArch64Architecture` and `X86_64Architecture` `final` and creating a `private` constructor so that this redundant byte code can be eliminated: public jdk.internal.foreign.abi.x64.X86_64Architecture(); Code: 0: aload_0 1: invokespecial #1 // Meth

RFR: 8298567: Make field in RandomAccessFile final

2022-12-12 Thread Per Minborg
This PR proposes making a field in `RandomAccessFile` final. Also, it modernises a switch statement. - Commit messages: - Reclare field final and modernize switch Changes: https://git.openjdk.org/jdk/pull/11632/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11632&range=00

Re: RFR: 8298567: Make field in RandomAccessFile final [v2]

2022-12-12 Thread Per Minborg
> This PR proposes making a field in `RandomAccessFile` final. Also, it > modernises a switch statement. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Make the field rw final - Changes: - all:

Re: RFR: 8298567: Make field in RandomAccessFile final [v3]

2022-12-12 Thread Per Minborg
> This PR proposes making a field in `RandomAccessFile` final. Also, it > modernises a switch statement. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Remove redundant check - Changes: - all: https://git.openj

Integrated: 8298567: Make field in RandomAccessFile final

2022-12-12 Thread Per Minborg
On Mon, 12 Dec 2022 12:48:47 GMT, Per Minborg wrote: > This PR proposes making a field in `RandomAccessFile` final. Also, it > modernises a switch statement. This pull request has now been integrated. Changeset: 81f57d56 Author: Per Minborg Committer: Roger Riggs URL:

RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile

2022-12-13 Thread Per Minborg
This PR suggests improving performance for read and write operations for the longer primitives in `RandomAccessFile`. These improvements would also propagate to other JDK classes relying on these improved `RandomAccessFile` operations. - Commit messages: - Perform I/O operations i

Re: RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile [v2]

2022-12-13 Thread Per Minborg
> This PR suggests improving performance for read and write operations for the > longer primitives in `RandomAccessFile`. > > These improvements would also propagate to other JDK classes relying on these > improved `RandomAccessFile` operations. Per Minborg has updated the pull

Re: RFR: 8298532: Declare private constructors for FFM internal Architecture implementations

2022-12-13 Thread Per Minborg
On Mon, 12 Dec 2022 08:37:02 GMT, Per Minborg wrote: > This PR proposes declaring `AArch64Architecture` and `X86_64Architecture` > `final` and creating a `private` constructor so that this redundant byte code > can be eliminated: > > > public jdk.internal.foreign.abi.x64.

Withdrawn: 8298532: Declare private constructors for FFM internal Architecture implementations

2022-12-13 Thread Per Minborg
On Mon, 12 Dec 2022 08:37:02 GMT, Per Minborg wrote: > This PR proposes declaring `AArch64Architecture` and `X86_64Architecture` > `final` and creating a `private` constructor so that this redundant byte code > can be eliminated: > > > public jdk.internal.foreign.abi.x64.

Re: RFR: JDK-8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-14 Thread Per Minborg
On Thu, 8 Dec 2022 15:57:23 GMT, Per Minborg wrote: >> This PR proposes changing variable names and text from "session" to "scope". >> The proposed changes are only for the FFM API and not other parts like the >> Vector API and test classes. > &

Withdrawn: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-14 Thread Per Minborg
On Thu, 8 Dec 2022 14:11:29 GMT, Per Minborg wrote: > This PR proposes changing variable names and text from "session" to "scope". > The proposed changes are only for the FFM API and not other parts like the > Vector API and test classes. This pull request

[jdk20] RFR: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-14 Thread Per Minborg
This PR proposes changing variable names from `session` to `scope`. The proposed changes are only for the FFM API and not other parts like the Vector API and test classes. - Commit messages: - Replace session with scope for FFM access Changes: https://git.openjdk.org/jdk20/pull/29

[jdk20] Integrated: JDK-8298277: Replace "session" with "scope" for FFM access

2022-12-14 Thread Per Minborg
On Wed, 14 Dec 2022 09:30:21 GMT, Per Minborg wrote: > This PR proposes changing variable names from `session` to `scope`. The > proposed changes are only for the FFM API and not other parts like the Vector > API and test classes. This pull request has now been integrated.

Re: RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile [v3]

2022-12-15 Thread Per Minborg
> This PR suggests improving performance for read and write operations for the > longer primitives in `RandomAccessFile`. > > These improvements would also propagate to other JDK classes relying on these > improved `RandomAccessFile` operations. Per Minborg has updated t

Re: RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile [v3]

2022-12-15 Thread Per Minborg
On Thu, 15 Dec 2022 09:56:37 GMT, Per Minborg wrote: >> This PR suggests improving performance for read and write operations for the >> longer primitives in `RandomAccessFile`. >> >> These improvements would also propagate to other JDK classes relying on >> th

Re: [jdk20] RFR: 8298797: Specification of some restricted methods is incorrect

2022-12-15 Thread Per Minborg
On Thu, 15 Dec 2022 10:43:35 GMT, Maurizio Cimadamore wrote: > This patch fixes some inconsistencies in the javadoc for restricted methods: > > * ModuleLayer.Controller::addEnableNativeAccess has a shorted text in its > `@throws` clause. This shorted text is now used everywhere. > * One overlo

Re: RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile [v4]

2022-12-16 Thread Per Minborg
> This PR suggests improving performance for read and write operations for the > longer primitives in `RandomAccessFile`. > > These improvements would also propagate to other JDK classes relying on these > improved `RandomAccessFile` operations. Per Minborg has updated t

Re: RFR: 8298639: Perform I/O operations in bulk for RandomAccessFile [v5]

2022-12-16 Thread Per Minborg
> This PR suggests improving performance for read and write operations for the > longer primitives in `RandomAccessFile`. > > These improvements would also propagate to other JDK classes relying on these > improved `RandomAccessFile` operations. Per Minborg has updated t

Integrated: 8298639: Perform I/O operations in bulk for RandomAccessFile

2022-12-18 Thread Per Minborg
On Tue, 13 Dec 2022 09:11:10 GMT, Per Minborg wrote: > This PR suggests improving performance for read and write operations for the > longer primitives in `RandomAccessFile`. > > These improvements would also propagate to other JDK classes relying on these > improved `R

RFR: 8299576: Reimplement java.io.Bits using VarHandle access

2023-01-04 Thread Per Minborg
Currently, `java.io.Bits` is using explicit logic to read/write various primitive types to/from byte arrays. Switching to the use of `VarHandle` access would provide better performance and less code. Also, using a standard API for these conversions means future `VarHandle` improvements will be

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access

2023-01-04 Thread Per Minborg
On Wed, 4 Jan 2023 08:48:56 GMT, Per Minborg wrote: > Currently, `java.io.Bits` is using explicit logic to read/write various > primitive types to/from byte arrays. Switching to the use of `VarHandle` > access would provide better performance and less code. > > Also, using a s

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v2]

2023-01-04 Thread Per Minborg
ture `VarHandle` > improvements will benefit `Bits` too. > > Improvements in `Bits` will propagate to `ObjectInputStream`, > `ObjectOutputStream` and `RandomAccessFile`. > > Initial benchmarks and performance discussions can be found here: > https://github.com/openjdk/panama-foreign/p

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v2]

2023-01-04 Thread Per Minborg
On Wed, 4 Jan 2023 09:01:06 GMT, Per Minborg wrote: >> Currently, `java.io.Bits` is using explicit logic to read/write various >> primitive types to/from byte arrays. Switching to the use of `VarHandle` >> access would provide better performance and less code. >> &

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v2]

2023-01-04 Thread Per Minborg
On Wed, 4 Jan 2023 09:25:40 GMT, Uwe Schindler wrote: > Do we need this test at all, because this code is tested to extense through > RandomAccessFile? We had no test before, so why add a new one here? > > Otherwise: PR looks good. There are overlaps of the RAF and Bits tests but the latter te

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v3]

2023-01-04 Thread Per Minborg
ture `VarHandle` > improvements will benefit `Bits` too. > > Improvements in `Bits` will propagate to `ObjectInputStream`, > `ObjectOutputStream` and `RandomAccessFile`. > > Initial benchmarks and performance discussions can be found here: > https://github.com/openjdk/panama-foreign/p

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v4]

2023-01-04 Thread Per Minborg
ture `VarHandle` > improvements will benefit `Bits` too. > > Improvements in `Bits` will propagate to `ObjectInputStream`, > `ObjectOutputStream` and `RandomAccessFile`. > > Initial benchmarks and performance discussions can be found here: > https://github.com/openjdk/panama-foreign/p

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v2]

2023-01-04 Thread Per Minborg
On Wed, 4 Jan 2023 10:49:18 GMT, Per Minborg wrote: >> Do we need this test at all, because this code is tested to extense through >> RandomAccessFile? We had no test before, so why add a new one here? >> >> Otherwise: PR looks good. > >> Do we need this

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v5]

2023-01-04 Thread Per Minborg
ture `VarHandle` > improvements will benefit `Bits` too. > > Improvements in `Bits` will propagate to `ObjectInputStream`, > `ObjectOutputStream` and `RandomAccessFile`. > > Initial benchmarks and performance discussions can be found here: > https://github.com/openjdk/panama-foreign/p

RFR: 8299513: Cleanup java.io

2023-01-04 Thread Per Minborg
Code in java.io contains many legacy constructs and semantics not recommended including: * C-style array declaration * Unnecessary visibility * Redundant keywords in interfaces (e.g. public, static) * Non-standard naming for constants * Javadoc typos * Missing final declaration These shou

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v6]

2023-01-05 Thread Per Minborg
ture `VarHandle` > improvements will benefit `Bits` too. > > Improvements in `Bits` will propagate to `ObjectInputStream`, > `ObjectOutputStream` and `RandomAccessFile`. > > Initial benchmarks and performance discussions can be found here: > https://github.com/openjdk/panama-foreign/p

Re: RFR: 8299513: Cleanup java.io [v2]

2023-01-05 Thread Per Minborg
typos > * Missing final declaration > > These should be fixed as a sanity effort. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rework StringWriter constructor - Changes: - all: https://git.openjdk.org/jd

Re: RFR: 8299513: Cleanup java.io [v2]

2023-01-05 Thread Per Minborg
On Thu, 5 Jan 2023 01:42:15 GMT, Brian Burkhalter wrote: >> I assume this is done so that "lock" is only set once during construction >> (StringWriter is a bit unusual in that it uses the SB as the lock object). A >> downside of the change is that it introduces casts. Another is that the >> ex

Re: RFR: 8299513: Cleanup java.io [v3]

2023-01-09 Thread Per Minborg
typos > * Missing final declaration > > These should be fixed as a sanity effort. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Revert constructor, add (c) year and revert some doc - Changes: - all: https://git

Re: RFR: 8299513: Cleanup java.io [v4]

2023-01-09 Thread Per Minborg
typos > * Missing final declaration > > These should be fixed as a sanity effort. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Add additional (c) years - Changes: - all: https://git.openjdk.org/jd

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-09 Thread Per Minborg
ture `VarHandle` > improvements will benefit `Bits` too. > > Improvements in `Bits` will propagate to `ObjectInputStream`, > `ObjectOutputStream` and `RandomAccessFile`. > > Initial benchmarks and performance discussions can be found here: > https://github.com/openjdk/panama-foreign/p

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-09 Thread Per Minborg
On Mon, 9 Jan 2023 08:33:09 GMT, Viktor Klang wrote: >> Currently Set.copyOf allocates both a HashSet and a new empty array when the >> input collection is empty. >> >> This patch avoids allocating anything for the case where the parameter >> collection's isEmpty returns true. > > Viktor Klang

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v2]

2023-01-10 Thread Per Minborg
On Mon, 9 Jan 2023 18:34:57 GMT, Per Minborg wrote: > On the note of `CHM::isEmpty`: It would be better to rewrite this method as a > short-circuitable reduction of the many CounterCells' values. As soon as at > least one of them are >0 then the map is not empty. In contr

RFR: 8299852: Modernize ConcurrentHashMap

2023-01-10 Thread Per Minborg
`java.util.concurrent.ConcurrentHashMap` is relatively old and has not been updated to reflect the current state of Java and can be modernized: * Add `@Serial` annotations * Seal classes and restrict subclassing for internal classes * Use pattern matching for instance * Remove redundant modif

Re: RFR: 8299513: Cleanup java.io [v5]

2023-01-10 Thread Per Minborg
typos > * Missing final declaration > > These should be fixed as a sanity effort. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Revert removal of a final keyword - Changes: - all: https://git.openjdk.org/jd

Re: RFR: 8299852: Modernize ConcurrentHashMap

2023-01-10 Thread Per Minborg
On Tue, 10 Jan 2023 12:04:10 GMT, Pavel Rappo wrote: > I'm sure others will note or have already noted elsewhere that we don't do > direct PRs against JSR 166. Yes. I will change the PR to a draft as we explore ways to integrate the spirit of the proposed changes. - PR: https://g

RFR: 8299864: ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE

2023-01-10 Thread Per Minborg
This PR proposes to add null-checking for some parameter arguments in `ZipFileStore`. - Commit messages: - Check null invariants Changes: https://git.openjdk.org/jdk/pull/11926/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11926&range=00 Issue: https://bugs.openjdk.org/

Re: RFR: 8299513: Cleanup java.io [v5]

2023-01-10 Thread Per Minborg
On Tue, 10 Jan 2023 14:59:35 GMT, Roger Riggs wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert removal of a final keyword > > src/java.base/share/classes/java/io/ObjectStreamCo

Re: RFR: 8299513: Cleanup java.io [v6]

2023-01-10 Thread Per Minborg
typos > * Missing final declaration > > These should be fixed as a sanity effort. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Revert removal of static modifier in OSC - Changes: - all: https://git.openjdk

Re: RFR: 8299864: ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE [v2]

2023-01-11 Thread Per Minborg
> This PR proposes to add null-checking for some parameter arguments in > `ZipFileStore`. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rename and improve NPE testing - Changes: - all: https://git.openjdk.o

Re: RFR: 8299864: ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE [v2]

2023-01-11 Thread Per Minborg
On Tue, 10 Jan 2023 17:29:56 GMT, Lance Andersen wrote: > This should be OK but might suggest adding a release note Do we need to do that for a package-private class? Maybe for internal use? - PR: https://git.openjdk.org/jdk/pull/11926

Re: RFR: 8299864: ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE [v3]

2023-01-11 Thread Per Minborg
> This PR proposes to add null-checking for some parameter arguments in > `ZipFileStore`. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Add test method comment - Changes: - all: https://git.openjdk.org/jd

Re: RFR: 8299864: ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE [v4]

2023-01-11 Thread Per Minborg
> This PR proposes to add null-checking for some parameter arguments in > `ZipFileStore`. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Fix typo and add bug ref - Changes: - all: https://git.openjdk.org/jd

Re: RFR: 8299513: Clean up java.io [v6]

2023-01-11 Thread Per Minborg
On Tue, 10 Jan 2023 17:33:26 GMT, Roger Riggs wrote: > The `static` declarations should be restored in ObjectStreamConstants. This has been fixed in [a previous commit](https://github.com/openjdk/jdk/pull/11848/commits/f231c16b9074c711ed6a417331a35a205516532a) - PR: https://git.op

Re: RFR: 8299513: Clean up java.io [v7]

2023-01-11 Thread Per Minborg
typos > * Missing final declaration > > These should be fixed as a sanity effort. Per Minborg has updated the pull request incrementally with two additional commits since the last revision: - Update src/java.base/share/classes/java/io/ObjectStreamConstants.java Co-authored

Re: RFR: 8299513: Clean up java.io [v8]

2023-01-11 Thread Per Minborg
typos > * Missing final declaration > > These should be fixed as a sanity effort. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Revert renaming - Changes: - all: https://git.openjdk.org/jdk/pull/11848/files -

Re: RFR: 8299513: Clean up java.io [v7]

2023-01-11 Thread Per Minborg
On Wed, 11 Jan 2023 09:13:27 GMT, Andrey Turbanov wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Update src/java.base/share/classes/java/io/ObjectStreamConstants.java >> >>

Re: [jdk20] RFR: 8299090: Specify coordinate order for additional CaptureCallState parameters on class as well

2023-01-11 Thread Per Minborg
On Wed, 11 Jan 2023 02:19:26 GMT, Jorn Vernee wrote: > A small doc clarification that also specifies where the additional > MemorySegment parameter of a downcall method handle linked with the > captureCallState option appears in the parameter list, on the > CaptureCallState class. LGTM -

Integrated: 8299864: ZipFileStore#supportsFileAttributeView(String) doesn't throw NPE

2023-01-11 Thread Per Minborg
On Tue, 10 Jan 2023 15:26:05 GMT, Per Minborg wrote: > This PR proposes to add null-checking for some parameter arguments in > `ZipFileStore`. This pull request has now been integrated. Changeset: 7d3400b1 Author: Per Minborg URL: https://git.openjdk.org/jdk/

Re: RFR: 8299513: Clean up java.io [v8]

2023-01-11 Thread Per Minborg
On Wed, 11 Jan 2023 10:36:57 GMT, Andrey Turbanov wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert renaming > > src/java.base/share/classes/java/io/DataInputStream.java line 2:

Re: RFR: 8299513: Clean up java.io [v9]

2023-01-11 Thread Per Minborg
typos > * Missing final declaration > > These should be fixed as a sanity effort. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Convert field to static and revert copyright year - Changes: - all: https://git

Re: RFR: 8299513: Clean up java.io [v9]

2023-01-12 Thread Per Minborg
On Wed, 11 Jan 2023 15:31:22 GMT, Per Minborg wrote: >> Code in java.io contains many legacy constructs and semantics not >> recommended including: >> >> * C-style array declaration >> * Unnecessary visibility >> * Redundant keywords in interfaces (e.g

Re: RFR: 8299852: Modernize ConcurrentHashMap [v2]

2023-01-12 Thread Per Minborg
stance > * Remove redundant modifiers (such as some final declarations) > * Use Objects.requireNonNull for invariant checking > * Use diamond operators instead of explicit types > * Simplify expressions using Math::max Per Minborg has updated the pull request incrementally with on

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v2]

2023-01-16 Thread Per Minborg
On Tue, 17 Jan 2023 01:08:09 GMT, j3graham wrote: > > Do you see any concrete examples of classes in the JDK that could benefit > > from a "VarHandlization"? > > `ImageOutputStreamImpl` and `ImageInputStreamImpl` in `javax.imageio.stream` > have some very similar code that might benefit. Also

Integrated: 8299576: Reimplement java.io.Bits using VarHandle access

2023-01-16 Thread Per Minborg
On Wed, 4 Jan 2023 08:48:56 GMT, Per Minborg wrote: > Currently, `java.io.Bits` is using explicit logic to read/write various > primitive types to/from byte arrays. Switching to the use of `VarHandle` > access would provide better performance and less code. > > Also, using a s

RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes

2023-01-19 Thread Per Minborg
This PR proposes using a performance optimization using a new supported API for operations similar to those found in `java.io.Bits` - Commit messages: - Remove white spaces - Remove white space - Fix jcheck issues - Update copyright years - Reformat javadoc - Prepare for review

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes

2023-01-19 Thread Per Minborg
On Wed, 18 Jan 2023 16:34:57 GMT, Per Minborg wrote: > This PR proposes using a performance optimization using a new supported API > for operations similar to those found in `java.io.Bits` Performance looks promising for serialization (values in us/operation):   | Java 20 | J

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes

2023-01-23 Thread Per Minborg
On Fri, 20 Jan 2023 16:36:23 GMT, Roger Riggs wrote: >> This PR proposes using a performance optimization using a new supported API >> for operations similar to those found in `java.io.Bits` > > src/java.base/share/classes/jdk/internal/util/access/ByteArrayAccess.java > line 26: > >> 24: */ >

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v2]

2023-01-23 Thread Per Minborg
On Fri, 20 Jan 2023 18:21:59 GMT, Roger Riggs wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve doc and fix typo > > src/java.base/share/classes/jdk/internal/util/access/By

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v2]

2023-01-23 Thread Per Minborg
> This PR proposes using a performance optimization using a new supported API > for operations similar to those found in `java.io.Bits` Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Improve doc and fix typo - C

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v3]

2023-01-23 Thread Per Minborg
> This PR proposes using a performance optimization using a new supported API > for operations similar to those found in `java.io.Bits` Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rename and move - Changes:

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v4]

2023-01-23 Thread Per Minborg
> This PR proposes using a performance optimization using a new supported API > for operations similar to those found in `java.io.Bits` Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Add benchmark - Changes:

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v4]

2023-01-23 Thread Per Minborg
On Mon, 23 Jan 2023 08:11:15 GMT, Per Minborg wrote: >> src/java.base/share/classes/jdk/internal/util/access/ByteArrayAccess.java >> line 614: >> >>> 612: /* >>> 613: * Methods for packing primitive values into byte arrays starting >>> a

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v4]

2023-01-23 Thread Per Minborg
On Mon, 23 Jan 2023 10:15:55 GMT, Per Minborg wrote: >> Very good question. I will take a look at it. A fixed value is inserted in >> the original var handle so potentially it might improve performance that way >> too. > > No significant performance increase: > &g

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v5]

2023-01-23 Thread Per Minborg
> This PR proposes using a performance optimization using a new supported API > for operations similar to those found in `java.io.Bits` Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Remove methods with implicit zero

Re: RFR: 8299513: Clean up java.io [v9]

2023-01-23 Thread Per Minborg
On Wed, 11 Jan 2023 15:31:22 GMT, Per Minborg wrote: >> Code in java.io contains many legacy constructs and semantics not >> recommended including: >> >> * C-style array declaration >> * Unnecessary visibility >> * Redundant keywords in interfaces (e.g

Withdrawn: 8299513: Clean up java.io

2023-01-23 Thread Per Minborg
On Wed, 4 Jan 2023 15:37:23 GMT, Per Minborg wrote: > Code in java.io contains many legacy constructs and semantics not recommended > including: > > * C-style array declaration > * Unnecessary visibility > * Redundant keywords in interfaces (e.g. public, static) > * No

RFR: 8300863: Remove C-style array declarations in java.io

2023-01-23 Thread Per Minborg
Some variables are declared using old-style declarations. These should be modified to conform to modern style. This is a task derived from https://github.com/openjdk/jdk/pull/11848 - Commit messages: - Fix more classes - Remove c-style declarations Changes: https://git.openjdk.o

RFR: 8300864: Declare some fields in java.io as final

2023-01-23 Thread Per Minborg
Some of the fields in java.io can be declared as final. - Commit messages: - Revert final class declaration - Declare fields final Changes: https://git.openjdk.org/jdk/pull/12140/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12140&range=00 Issue: https://bugs.openjdk.or

RFR: 8300866: Declare some classes final in java.io

2023-01-23 Thread Per Minborg
This PR proposes declaring some internal classes in java.io as `final`, explicitly indicating that they are not intended for sub-classing. If you think declaring classes final is just "static noice", please see http://minborgsjavapot.blogspot.com/2021/12/why-general-inheritance-is-flawed-and.ht

RFR: JDK-8300867: Fix document issues in java.io

2023-01-23 Thread Per Minborg
This PR fixes a couple of typos in the documentation. - Commit messages: - Update copyright year - Fix javadoc issues Changes: https://git.openjdk.org/jdk/pull/12142/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12142&range=00 Issue: https://bugs.openjdk.org/browse/JDK-

RFR: 8300868: Reduce visibility in java.io.SerialCallbackContext

2023-01-23 Thread Per Minborg
This PR proposes to reduce the visibility for constructor and methods in `java.io.SerialCallbackContext`. - Commit messages: - Reduce visibility in j.i.SerialCallbackConext Changes: https://git.openjdk.org/jdk/pull/12143/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12143

Re: RFR: 8300868: Reduce visibility in java.io.SerialCallbackContext [v2]

2023-01-23 Thread Per Minborg
> This PR proposes to reduce the visibility for constructor and methods in > `java.io.SerialCallbackContext`. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Update copyright year - Changes: - all:

Integrated: 8300864: Declare some fields in java.io as final

2023-01-23 Thread Per Minborg
On Mon, 23 Jan 2023 14:24:16 GMT, Per Minborg wrote: > Some of the fields in java.io can be declared as final. This pull request has now been integrated. Changeset: 079255e3 Author: Per Minborg URL: https://git.openjdk.org/jdk/commit/079255e312a60584d748babcd320eacec99c5a02 St

Integrated: 8300868: Reduce visibility in java.io.SerialCallbackContext

2023-01-23 Thread Per Minborg
On Mon, 23 Jan 2023 15:08:47 GMT, Per Minborg wrote: > This PR proposes to reduce the visibility for constructor and methods in > `java.io.SerialCallbackContext`. This pull request has now been integrated. Changeset: a7f035db Author: Per Minborg URL: https://git.openjdk.o

<    1   2   3   4   5   6   7   8   9   10   >