Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-06-16 Thread David Holmes
On Wed, 16 Jun 2021 08:08:47 GMT, Yi Yang wrote: > After JDK-8265518(#3615), it's possible to replace all variants of checkIndex > by Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in > the whole JDK codebase. Class loading order is different to class initialization

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-06-16 Thread Yi Yang
On Thu, 17 Jun 2021 01:51:41 GMT, David Holmes wrote: > I skimmed through all these and the changes seem fine in principal. > I have two mild concerns: > > 1. How does this change the class initialization order on VM startup? > 2. Do any tests need adjusting due to potential changes in the

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-06-16 Thread David Holmes
On Wed, 16 Jun 2021 08:08:47 GMT, Yi Yang wrote: > After JDK-8265518(#3615), it's possible to replace all variants of checkIndex > by Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in > the whole JDK codebase. I skimmed through all these and the changes seem fine in

Re: [jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails

2021-06-16 Thread David Holmes
On Wed, 16 Jun 2021 11:19:37 GMT, Jorn Vernee wrote: > Upstream a critical fix from the panama-foreign repo. > > See the prior review thread here: > https://github.com/openjdk/panama-foreign/pull/558 > > Testing: tier 1-2, local run of run-test-jdk_foreign. Hi Jorn, Seems okay but I have

Re: [jdk17] RFR: 8268353: Test libsvml.so is and is not present in jdk image [v2]

2021-06-16 Thread Jie Fu
On Wed, 16 Jun 2021 15:29:19 GMT, Paul Sandoz wrote: >> Test that when the jdk.incubator.vector module is present that libsvml.so is >> present, and test the opposite case. > > Paul Sandoz has updated the pull request incrementally with one additional > commit since the last revision: > >

Re: [jdk17] RFR: 8268888: Upstream 8268230: Foreign Linker API & Windows user32/kernel32: String conversion seems broken [v2]

2021-06-16 Thread Jorn Vernee
> Upstream fix for 8268230 to mainline JDK. > > Prior review thread can be found here: > https://github.com/openjdk/panama-foreign/pull/554 > > Testing: jdk_foreign test suite on Windows and Linux (WSL). Jorn Vernee has updated the pull request incrementally with one additional commit since

Re: jpackage issue with --dest

2021-06-16 Thread Maurizio Cimadamore
Also, if --dest is removed, or if it is set to something which doesn't contain the "bin" subfolder, everything works... that seems different from the issue you linked? Maurizio On 16/06/2021 22:11, Maurizio Cimadamore wrote: Hi, I've built my JDK this morning. I checked now with `git log`

Re: jpackage issue with --dest

2021-06-16 Thread Maurizio Cimadamore
Hi, I've built my JDK this morning. I checked now with `git log` and I do have: https://bugs.openjdk.java.net/browse/JDK-8267598 Maurizio On 16/06/2021 21:12, Alexey Semenyuk wrote: Hi Maurizio, Thank you for the provided output. According to the log, app launcher loaded libjli.so and it

Re: [jdk17] RFR: 8266518: Refactor and expand scatter/gather tests

2021-06-16 Thread Sandhya Viswanathan
On Mon, 14 Jun 2021 16:26:17 GMT, Paul Sandoz wrote: > Refactor scatter/gather tests to be included in the load/store test classes > and expand to support access between `ShortVector` and and `char[]`, and > access between `ByteVector` and `boolean[]`. > > Vector tests pass on linux-x64

[jdk17] RFR: JDK-8268826: Cleanup Override in Context-Specific Deserialization Filters

2021-06-16 Thread Roger Riggs
Remove the unnecessary special case "OVERRIDE" in jdk.serialFilterFactory property. Fix description in the example of a filter allowing platform classes. Suppress some warnings about use of SecurityManager in tests. - Commit messages: - JDK-8268827: Cleanup Implement

Re: jpackage issue with --dest

2021-06-16 Thread Alexey Semenyuk
Hi Maurizio, Thank you for the provided output. According to the log, app launcher loaded libjli.so and it failed in JLI_Launch() function. Probably the problem is that you use jpackage from the build that has https://bugs.openjdk.java.net/browse/JDK-8263157 fix that resulted in a number of

Re: [jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved

2021-06-16 Thread Jan Lahoda
On Wed, 16 Jun 2021 15:15:25 GMT, Jan Lahoda wrote: > Currently, an enum switch with patterns is desugared in a very non-standard, > and potentially slow, way. It would be better to use the standard > `typeSwitch` bootstrap to classify the enum constants. The bootstrap needs to > accept enum

Re: [jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails

2021-06-16 Thread Erik Joelsson
On Wed, 16 Jun 2021 11:19:37 GMT, Jorn Vernee wrote: > Upstream a critical fix from the panama-foreign repo. > > See the prior review thread here: > https://github.com/openjdk/panama-foreign/pull/558 > > Testing: tier 1-2, local run of run-test-jdk_foreign. Build changes look good.

Re: jpackage issue with --dest

2021-06-16 Thread Maurizio Cimadamore
This is what I get when I run jpackage: ``` $ jpackage --type app-image --name HelloWorld --input /home/maurizio/Desktop/panama-test/jpackage-test/out/artifacts/jpackage_test_jar --main-jar jpackage-test.jar --dest bin [18:50:09.375] jpackage argument list: [--type, app-image, --name,

[jdk17] RFR: 8268888: Upstream 8268230: Foreign Linker API & Windows user32/kernel32: String conversion seems broken

2021-06-16 Thread Jorn Vernee
Upstream fix for 8268230 to mainline JDK. Prior review thread can be found here: https://github.com/openjdk/panama-foreign/pull/554 Testing: jdk_foreign test suite on Windows and Linux (WSL). - Commit messages: - 8268230: Foreign Linker API & Windows user32/kernel32: String

Re: jpackage issue with --dest

2021-06-16 Thread Alexey Semenyuk
Hi Maurizio, This is not known issue. Can you run the app with "JPACKAGE_DEBUG" env variable set to "true". In this case the app launcher will produce debug output that will help to understand why it can't find libjava.so. - Alexey On 6/16/2021 9:11 AM, Maurizio Cimadamore wrote: Hi, I'm

Re: [jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved

2021-06-16 Thread Brian Goetz
Bootstrap methods are cheap. If you have one that is semantically different, better to write a separate bootstrap than to try and cram two sets of functionality into one.  So +1 for "make a new bootstrap for enums." On 6/16/2021 11:25 AM, Jan Lahoda wrote: Currently, an enum switch with

Re: RFR: 8268469: Update java.time to use switch expressions [v3]

2021-06-16 Thread Stephen Colebourne
On Wed, 16 Jun 2021 11:11:30 GMT, Chris Hegarty wrote: >> src/java.base/share/classes/java/time/Month.java line 480: >> >>> 478: int leap = leapYear ? 1 : 0; >>> 479: return switch (this) { >>> 480: case JANUARY -> 1; >> >> Unnecessary alignment > > The vertical

Re: RFR: 8268457: XML Transformer outputs Unicode supplementary character incorrectly to HTML

2021-06-16 Thread Naoto Sato
On Fri, 11 Jun 2021 12:42:35 GMT, Masanori Yano wrote: > Hi all, > > Could you please review the 8268457 bug fixes? > > The problem is that ToHTMLStream applies processing for non-surrogate pairs > to the surrogate pair. > This fix changes the processing for non-surrogate pairs to the else

Re: RFR: 8266310: deadlock while loading the JNI code [v8]

2021-06-16 Thread Mandy Chung
On Wed, 16 Jun 2021 07:51:32 GMT, Aleksei Voitylov wrote: >> Please review this PR which fixes the deadlock in ClassLoader between the >> two lock objects - a lock object associated with the class being loaded, and >> the ClassLoader.loadedLibraryNames hash map, locked during the native >>

Re: RFR: 8266310: deadlock while loading the JNI code [v8]

2021-06-16 Thread Mandy Chung
On Wed, 16 Jun 2021 07:51:32 GMT, Aleksei Voitylov wrote: >> Please review this PR which fixes the deadlock in ClassLoader between the >> two lock objects - a lock object associated with the class being loaded, and >> the ClassLoader.loadedLibraryNames hash map, locked during the native >>

Re: [jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails

2021-06-16 Thread Maurizio Cimadamore
On Wed, 16 Jun 2021 11:19:37 GMT, Jorn Vernee wrote: > Upstream a critical fix from the panama-foreign repo. > > See the prior review thread here: > https://github.com/openjdk/panama-foreign/pull/558 > > Testing: tier 1-2, local run of run-test-jdk_foreign. I've approved a similar changeset

Re: [jdk17] RFR: 8268353: Test libsvml.so is and is not present in jdk image [v2]

2021-06-16 Thread Paul Sandoz
On Wed, 16 Jun 2021 01:20:39 GMT, Jie Fu wrote: >> Paul Sandoz has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Require C2. > > The test logic should be changed. > > If C2 is absent, libsvml.so would not be generated after JDK-8268643.

Re: [jdk17] RFR: 8268353: Test libsvml.so is and is not present in jdk image [v2]

2021-06-16 Thread Paul Sandoz
> Test that when the jdk.incubator.vector module is present that libsvml.so is > present, and test the opposite case. Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision: Require C2. - Changes: - all:

[jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved

2021-06-16 Thread Jan Lahoda
Currently, an enum switch with patterns is desugared in a very non-standard, and potentially slow, way. It would be better to use the standard `typeSwitch` bootstrap to classify the enum constants. The bootstrap needs to accept enum constants as labels in order to allow this. A complication is

Re: JEP 411: Deprecation with removal would break most existing Java libraries

2021-06-16 Thread David Lloyd
On Mon, Jun 14, 2021 at 6:47 PM Peter Firmstone wrote: > SecurityManager depends on Permission, currently there are Permission > checks throughout the JVM, however Permission implementation classes > will be removed, although the Permission class itself won't be. This is incorrect AFAICT. The

jpackage issue with --dest

2021-06-16 Thread Maurizio Cimadamore
Hi, I'm relatively new to jpackage and I found a weird issue on linux where the name of a --dest folder can affect the correct behavior of the generated application image. I have put together an hello world application, with a jarfile. If I jpackage it with the following command line: ```

[jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails

2021-06-16 Thread Jorn Vernee
Upstream a critical fix from the panama-foreign repo. See the prior review thread here: https://github.com/openjdk/panama-foreign/pull/558 Testing: tier 1-2, local run of run-test-jdk_foreign. - Commit messages: - Fix a couple of CI build problems - Upstream: 8268673: Stack walk

Re: RFR: 8268469: Update java.time to use switch expressions [v3]

2021-06-16 Thread Patrick Concannon
On Wed, 9 Jun 2021 22:11:59 GMT, Stephen Colebourne wrote: >> Patrick Concannon has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains four additional

Re: RFR: 8268469: Update java.time to use switch expressions [v3]

2021-06-16 Thread Chris Hegarty
On Wed, 16 Jun 2021 10:59:59 GMT, Stephen Colebourne wrote: >> Patrick Concannon has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains four

Re: RFR: 8268469: Update java.time to use switch expressions [v3]

2021-06-16 Thread Stephen Colebourne
On Wed, 16 Jun 2021 10:57:07 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.time` >> packages to make use of the switch expressions? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request with a new

Re: RFR: 8268469: Update java.time to use switch expressions [v3]

2021-06-16 Thread Patrick Concannon
On Wed, 9 Jun 2021 16:25:55 GMT, Naoto Sato wrote: >> Patrick Concannon has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains four additional >>

Re: RFR: 8268469: Update java.time to use switch expressions [v3]

2021-06-16 Thread Patrick Concannon
On Wed, 9 Jun 2021 16:31:10 GMT, Daniel Fuchs wrote: >> Patrick Concannon has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains four additional >>

Re: RFR: 8268469: Update java.time to use switch expressions [v3]

2021-06-16 Thread Patrick Concannon
> Hi, > > Could someone please review my code for updating the code in the `java.time` > packages to make use of the switch expressions? > > Kind regards, > Patrick Patrick Concannon has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev

Re: RFR: 8268469: Update java.time to use switch expressions [v3]

2021-06-16 Thread Patrick Concannon
On Wed, 9 Jun 2021 22:03:54 GMT, Stephen Colebourne wrote: >> Patrick Concannon has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains four additional

Re: [jdk17] RFR: 8268080: java/util/concurrent/forkjoin/AsyncShutdownNow.java fails with java.util.concurrent.RejectedExecutionException [v2]

2021-06-16 Thread Julia Boes
On Wed, 16 Jun 2021 10:28:11 GMT, Pavel Rappo wrote: >> Julia Boes has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix copyright year > > test/jdk/java/util/concurrent/forkjoin/AsyncShutdownNowInvokeAny.java line 2: > >> 1: /* >> 2: *

Re: [jdk17] RFR: 8268080: java/util/concurrent/forkjoin/AsyncShutdownNow.java fails with java.util.concurrent.RejectedExecutionException [v2]

2021-06-16 Thread Daniel Fuchs
On Wed, 16 Jun 2021 10:45:20 GMT, Julia Boes wrote: >> In the methods in question, `RejectedExecutionException` is an expected >> exception that was previously unhandled (it is a `RuntimeException`, not a >> subclass of `ExecutionException`). This change adds >> `RejectedExecutionException`

Re: [jdk17] RFR: 8268080: java/util/concurrent/forkjoin/AsyncShutdownNow.java fails with java.util.concurrent.RejectedExecutionException [v2]

2021-06-16 Thread Julia Boes
> In the methods in question, `RejectedExecutionException` is an expected > exception that was previously unhandled (it is a `RuntimeException`, not a > subclass of `ExecutionException`). This change adds > `RejectedExecutionException` to the existing catch clause. Julia Boes has updated the

Re: [jdk17] RFR: 8268080: java/util/concurrent/forkjoin/AsyncShutdownNow.java fails with java.util.concurrent.RejectedExecutionException

2021-06-16 Thread Daniel Fuchs
On Wed, 16 Jun 2021 09:57:29 GMT, Julia Boes wrote: > In the methods in question, `RejectedExecutionException` is an expected > exception that was previously unhandled (it is a `RuntimeException`, not a > subclass of `ExecutionException`). This change adds > `RejectedExecutionException` to

Re: [jdk17] RFR: 8268080: java/util/concurrent/forkjoin/AsyncShutdownNow.java fails with java.util.concurrent.RejectedExecutionException

2021-06-16 Thread Pavel Rappo
On Wed, 16 Jun 2021 09:57:29 GMT, Julia Boes wrote: > In the methods in question, `RejectedExecutionException` is an expected > exception that was previously unhandled (it is a `RuntimeException`, not a > subclass of `ExecutionException`). This change adds > `RejectedExecutionException` to

Re: [jdk17] RFR: 8268080: java/util/concurrent/forkjoin/AsyncShutdownNow.java fails with java.util.concurrent.RejectedExecutionException

2021-06-16 Thread Chris Hegarty
On Wed, 16 Jun 2021 09:57:29 GMT, Julia Boes wrote: > In the methods in question, `RejectedExecutionException` is an expected > exception that was previously unhandled (it is a `RuntimeException`, not a > subclass of `ExecutionException`). This change adds > `RejectedExecutionException` to

[jdk17] RFR: 8268080: java/util/concurrent/forkjoin/AsyncShutdownNow.java fails with java.util.concurrent.RejectedExecutionException

2021-06-16 Thread Julia Boes
In the methods in question, `RejectedExecutionException` is an expected exception that was previously unhandled (it is a `RuntimeException`, not a subclass of `ExecutionException`). This change adds `RejectedExecutionException` to the existing catch clause. - Commit messages: -

Re: RFR: 8268873: Unnecessary Vector usage in java.base

2021-06-16 Thread Andrey Turbanov
On Wed, 16 Jun 2021 09:01:30 GMT, Сергей Цыпанов wrote: >> Usage of thread-safe collection `Vector` is unnecessary. It's recommended to >> use `ArrayList` if a thread-safe implementation is not needed. >> I checked only places where `Vector` was used as local variable. > >

Re: RFR: 8268873: Unnecessary Vector usage in java.base

2021-06-16 Thread Сергей Цыпанов
On Mon, 14 Jun 2021 11:34:50 GMT, Andrey Turbanov wrote: > Usage of thread-safe collection `Vector` is unnecessary. It's recommended to > use `ArrayList` if a thread-safe implementation is not needed. > I checked only places where `Vector` was used as local variable. I've filed

RFR: 8268873: Unnecessary Vector usage in java.base

2021-06-16 Thread Andrey Turbanov
Usage of thread-safe collection `Vector` is unnecessary. It's recommended to use `ArrayList` if a thread-safe implementation is not needed. I checked only places where `Vector` was used as local variable. - Commit messages: - [PATCH] Unnecessary Vector usage in java.base - [PATCH]

Re: RFR: 8268873: Unnecessary Vector usage in java.base

2021-06-16 Thread Michael Bien
On Mon, 14 Jun 2021 11:34:50 GMT, Andrey Turbanov wrote: > Usage of thread-safe collection `Vector` is unnecessary. It's recommended to > use `ArrayList` if a thread-safe implementation is not needed. > I checked only places where `Vector` was used as local variable.

Re: RFR: 8268873: Unnecessary Vector usage in java.base

2021-06-16 Thread Andrey Turbanov
On Tue, 15 Jun 2021 16:05:06 GMT, Michael Bien wrote: >> Usage of thread-safe collection `Vector` is unnecessary. It's recommended to >> use `ArrayList` if a thread-safe implementation is not needed. >> I checked only places where `Vector` was used as local variable. > >

RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible

2021-06-16 Thread Yi Yang
After JDK-8265518, it's possible to replace all variants of checkIndex by Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in the whole JDK codebase. - Commit messages: - use checkIndex globally Changes: https://git.openjdk.java.net/jdk/pull/4507/files

Re: RFR: 8266310: deadlock while loading the JNI code [v7]

2021-06-16 Thread Aleksei Voitylov
On Mon, 14 Jun 2021 18:30:23 GMT, Mandy Chung wrote: >> Aleksei Voitylov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> address review comments > > test/jdk/java/lang/ClassLoader/loadLibraryDeadlock/LoadLibraryDeadlock.java > line 44:

Re: RFR: 8266310: deadlock while loading the JNI code [v8]

2021-06-16 Thread Aleksei Voitylov
> Please review this PR which fixes the deadlock in ClassLoader between the two > lock objects - a lock object associated with the class being loaded, and the > ClassLoader.loadedLibraryNames hash map, locked during the native library > load operation. > > Problem being fixed: > > The initial

Re: RFR: 8266310: deadlock while loading the JNI code [v7]

2021-06-16 Thread Aleksei Voitylov
On Fri, 11 Jun 2021 10:03:44 GMT, Aleksei Voitylov wrote: >> Please review this PR which fixes the deadlock in ClassLoader between the >> two lock objects - a lock object associated with the class being loaded, and >> the ClassLoader.loadedLibraryNames hash map, locked during the native >>