Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class

2021-06-25 Thread Chris Hegarty
> On 24 Jun 2021, at 22:27, Mandy Chung wrote: > > On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov > wrote: > >> Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 >> against JDK17. >> >> This fixes the deadlock in ClassLoader between the two lock objects - a lock

Re: [jdk17] RFR: JDK-8266269: Lookup::accessClass fails with IAE when accessing an arrayClass with a protected inner class as component class

2021-06-25 Thread Chris Hegarty
On Thu, 24 Jun 2021 18:42:23 GMT, Mandy Chung wrote: > `Lookup::accessClass` should determine the accessibility of the element type. > An array class is accessible if and only if its element type is accessible. > > This also fixes a spec bug to document `@throws NullPointerException` if the

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

2021-06-25 Thread Daniel Fuchs
On Thu, 24 Jun 2021 21:06:54 GMT, Roger Riggs wrote: >> 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. > > Roger

RFR: 8269373: some tests in jdk/tools/launcher/ fails on localized Windows platform

2021-06-25 Thread Masanori Yano
Hi all, Could you please review the 8269373 bug fixes? These tests call java.lang.ProcessBuilder in direct, so not used jtreg command option. To run non-localized tests, -Duser.language=en and -Duser.country=US options should be added in ProcessBuilder. - Commit messages: -

RFR: 8269383: New java.nio.ByteOrder.isBigEndian and isLittleEndian methods

2021-06-25 Thread Yi Yang
Hi, can I have a review of this change that adds two new utility methods for java.nio.ByteOrder? Looking through the whole JDK codebase, most calls of ByteOrder.nativeOrder() is to check if the underlying platform is little-endian/big-endian. There is no reason to only provide

Re: [jdk17] RFR: 8269036: tools/jpackage/share/AppImagePackageTest.java failed with "hdiutil: create failed - Resource busy"

2021-06-25 Thread Andy Herrick
On Tue, 22 Jun 2021 21:59:43 GMT, Alexander Matveev wrote: > Looks like another "Resource busy" issue similar to recent fixes for "hdiutil > convert" and "hdiutil detach". Workaround in same way by repeating "create" > command. Modified RetryExecutor to pass write to file flag, otherwise >

RFR: 8269384: Determine native byte order for StringUTF16 via ByteOrder

2021-06-25 Thread Yi Yang
Prefer using ByteOrder to compute byte order for StringUTF16 to determining byte order by native method StringUTF16.isBigEndian. - Commit messages: - replace Changes: https://git.openjdk.java.net/jdk/pull/4596/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=4596=00

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v2]

2021-06-25 Thread Alan Bateman
On Fri, 25 Jun 2021 01:39:21 GMT, Brian Burkhalter wrote: >> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and >> `read(byte[],int,int)` to return zero per the `InputStream` specification >> when the byte array actual or specified length is zero. > > Brian Burkhalter has updated

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v5]

2021-06-25 Thread Aleksei Efimov
On Thu, 24 Jun 2021 12:01:04 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review the second half of my update for the `java.time` >> package to make use of switch expressions? >> >> This PR was split into two parts due to the large number of files affected. >> >> Kind

Re: [jdk17] RFR: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class

2021-06-25 Thread Aleksei Voitylov
On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov wrote: > Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 > against JDK17. > > This fixes the deadlock in ClassLoader between the two lock objects - a lock > object associated with the class being loaded, and the >

[jdk17] Withdrawn: JDK-8266310: deadlock between System.loadLibrary and JNI FindClass loading another class

2021-06-25 Thread Aleksei Voitylov
On Fri, 18 Jun 2021 09:50:49 GMT, Aleksei Voitylov wrote: > Resubmitting the following PR https://github.com/openjdk/jdk/pull/3976 > against JDK17. > > This fixes the deadlock in ClassLoader between the two lock objects - a lock > object associated with the class being loaded, and the >

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v2]

2021-06-25 Thread Brian Burkhalter
On Fri, 25 Jun 2021 01:39:21 GMT, Brian Burkhalter wrote: >> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and >> `read(byte[],int,int)` to return zero per the `InputStream` specification >> when the byte array actual or specified length is zero. > > Brian Burkhalter has updated

Re: RFR: 8269383: (bf) ByteOrder should expose methods to test if platform is big or little endian

2021-06-25 Thread Yi Yang
On Fri, 25 Jun 2021 13:30:56 GMT, Yi Yang wrote: > Hi, can I have a review of this change that adds two new utility methods for > java.nio.ByteOrder? Looking through the whole JDK codebase, most calls of > ByteOrder.nativeOrder() is to check if the underlying platform is >

Integrated: 8268469: Update java.time to use switch expressions

2021-06-25 Thread Patrick Concannon
On Wed, 9 Jun 2021 15:41:59 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 This pull request has now been integrated. Changeset: 1d167978

Re: RFR: 8269384: Determine native byte order for StringUTF16 via ByteOrder

2021-06-25 Thread Aleksey Shipilev
On Fri, 25 Jun 2021 13:40:54 GMT, Yi Yang wrote: > Prefer using ByteOrder to compute byte order for StringUTF16 to determining > byte order by native method StringUTF16.isBigEndian. Adding new dependencies in `String` quite probably risks bootstrapping issues. There is a reason why `String`

Re: RFR: 8269383: New java.nio.ByteOrder.isBigEndian and isLittleEndian methods

2021-06-25 Thread Alan Bateman
On 25/06/2021 14:51, David Lloyd wrote: Is this better than the current solution of `nativeOrder() == BIG_ENDIAN` other than reducing a few keystrokes? I wouldn't expect many developers would need to be concerned with the platform endianness, it's more likely going to be something advanced,

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

2021-06-25 Thread Paul Sandoz
On Wed, 23 Jun 2021 11:58:06 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

Re: RFR: 8269383: New java.nio.ByteOrder.isBigEndian and isLittleEndian methods

2021-06-25 Thread David Lloyd
Is this better than the current solution of `nativeOrder() == BIG_ENDIAN` other than reducing a few keystrokes? On Fri, Jun 25, 2021 at 8:45 AM Yi Yang wrote: > > Hi, can I have a review of this change that adds two new utility methods for > java.nio.ByteOrder? Looking through the whole JDK

Re: RFR: 8269383: (bf) ByteOrder should expose methods to test if platform is big or little endian

2021-06-25 Thread Kevin Rushforth
On Fri, 25 Jun 2021 13:30:56 GMT, Yi Yang wrote: > Hi, can I have a review of this change that adds two new utility methods for > java.nio.ByteOrder? Looking through the whole JDK codebase, most calls of > ByteOrder.nativeOrder() is to check if the underlying platform is >

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

2021-06-25 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. Roger Riggs has updated the pull request incrementally with one

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

2021-06-25 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: 8269383: (bf) ByteOrder should expose methods to test if platform is big or little endian

2021-06-25 Thread Chris Hegarty
On Fri, 25 Jun 2021 13:30:56 GMT, Yi Yang wrote: > Hi, can I have a review of this change that adds two new utility methods for > java.nio.ByteOrder? Looking through the whole JDK codebase, most calls of > ByteOrder.nativeOrder() is to check if the underlying platform is >

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

2021-06-25 Thread Daniel Fuchs
On Fri, 25 Jun 2021 14:54:45 GMT, Roger Riggs wrote: >> 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. > > Roger

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v2]

2021-06-25 Thread Naoto Sato
On Fri, 25 Jun 2021 01:39:21 GMT, Brian Burkhalter wrote: >> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and >> `read(byte[],int,int)` to return zero per the `InputStream` specification >> when the byte array actual or specified length is zero. > > Brian Burkhalter has updated

Re: [jdk17] RFR: JDK-8266269: Lookup::accessClass fails with IAE when accessing an arrayClass with a protected inner class as component class

2021-06-25 Thread Mandy Chung
On Fri, 25 Jun 2021 08:44:54 GMT, Chris Hegarty wrote: >> `Lookup::accessClass` should determine the accessibility of the element >> type. An array class is accessible if and only if its element type is >> accessible. >> >> This also fixes a spec bug to document `@throws

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

2021-06-25 Thread Brent Christian
On Fri, 25 Jun 2021 14:54:45 GMT, Roger Riggs wrote: >> 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. > > Roger

[jdk17] RFR: JDK-8269351: Proxy::newProxyInstance and MethodHandleProxies::asInterfaceInstance should reject sealed interfaces

2021-06-25 Thread Mandy Chung
`java.lang.reflect.Proxy::newProxyInstance` and `java.lang.invoke.MethodHandleProxies::asInterfaceInstance` do not specify how to deal with sealed interfaces. These APIs should reject sealed interface with `IllegalArgumentException` which is thrown if the given interface is invalid. Please

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v2]

2021-06-25 Thread Brian Burkhalter
On Fri, 25 Jun 2021 01:39:21 GMT, Brian Burkhalter wrote: >> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and >> `read(byte[],int,int)` to return zero per the `InputStream` specification >> when the byte array actual or specified length is zero. > > Brian Burkhalter has updated

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

2021-06-25 Thread Roger Riggs
On Fri, 25 Jun 2021 16:48:45 GMT, Brent Christian wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update logging of faults in jdk.serialFilterFactory to log only the >> exception message >> Simplify the

Re: RFR: 8269383: New java.nio.ByteOrder.isBigEndian and isLittleEndian methods

2021-06-25 Thread Yi Yang
Hi David, In my humble option, it is reasonable to provide APIs to check whether the underlying platform is big-endian/little-endian.For most cases, we want a checking(byte order) rather than retrieving(byte order). -- From:David

[jdk17] Integrated: 8256919: BCEL: Utility.encode forget to close

2021-06-25 Thread Joe Wang
On Thu, 24 Jun 2021 20:36:29 GMT, Joe Wang wrote: > Fix a regression caused by the previous BCEL update. The issue was fixed in > the current BCEL repo with a reversal of the previous code, adding back > "gos.close();". Note however, doing so will result in a warning: [try] > explicit call to

[jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K

2021-06-25 Thread Weijun Wang
More refactoring to limit the scope of `@SuppressWarnings` annotations. Sometimes I introduce new methods. Please feel free to suggest method names you like to use. - Commit messages: - 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K Changes:

Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K

2021-06-25 Thread Lance Andersen
On Fri, 25 Jun 2021 20:04:37 GMT, Weijun Wang wrote: > More refactoring to limit the scope of `@SuppressWarnings` annotations. > > Sometimes I introduce new methods. Please feel free to suggest method names > you like to use. Changes look good Max - Marked as reviewed by lancea

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v2]

2021-06-25 Thread Roger Riggs
On Fri, 25 Jun 2021 01:39:21 GMT, Brian Burkhalter wrote: >> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and >> `read(byte[],int,int)` to return zero per the `InputStream` specification >> when the byte array actual or specified length is zero. > > Brian Burkhalter has updated

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v2]

2021-06-25 Thread Brian Burkhalter
On Fri, 25 Jun 2021 17:49:37 GMT, Roger Riggs wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 6766844: Add bug ID to test > > The spec for ByteArrayInputStream.read(byte[], off, len) is pretty specific >

Re: [jdk17] RFR: 8269034: AccessControlException for SunPKCS11 daemon threads [v2]

2021-06-25 Thread Valerie Peng
On Tue, 22 Jun 2021 20:08:03 GMT, Sean Coffey wrote: >> Sufficient permissions missing if this code was ever to run with >> SecurityManager. >> >> Cleanest approach appears to be use of InnocuousThread to create the >> cleaner/poller threads. >> Test case coverage extended to cover the

Re: [jdk17] RFR: 8269034: AccessControlException for SunPKCS11 daemon threads [v2]

2021-06-25 Thread Valerie Peng
On Fri, 25 Jun 2021 19:39:22 GMT, Valerie Peng wrote: >> Sean Coffey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move TokenPoller to Runnable > > src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java line > 952:

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v4]

2021-06-25 Thread Naoto Sato
On Fri, 25 Jun 2021 20:47:21 GMT, Brian Burkhalter wrote: >> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and >> `read(byte[],int,int)` to return zero per the `InputStream` specification >> when the byte array actual or specified length is zero. > > Brian Burkhalter has

Integrated: 8266901: Clarify the method description of Duration.toDaysPart()

2021-06-25 Thread Naoto Sato
On Mon, 21 Jun 2021 18:22:26 GMT, Naoto Sato wrote: > Please review this doc clarification fix to `toDaysPart()` method. CSR will > also be filed accordingly. This pull request has now been integrated. Changeset: 223759fb Author:Naoto Sato URL:

Re: [jdk17] RFR: JDK-8269351: Proxy::newProxyInstance and MethodHandleProxies::asInterfaceInstance should reject sealed interfaces

2021-06-25 Thread Joe Darcy
On Fri, 25 Jun 2021 17:24:58 GMT, Mandy Chung wrote: > `java.lang.reflect.Proxy::newProxyInstance` and > `java.lang.invoke.MethodHandleProxies::asInterfaceInstance` do not specify > how to deal with sealed interfaces. These APIs should reject sealed > interface with

[jdk17] RFR: JDK-8266313 (JEP-356) - RandomGenerator spec implementation requirements tightly coupled to JDK internal classes

2021-06-25 Thread Jim Laskey
The wording of the @implSpec referred to internal methods in the description. The patch rewords the @implSpec to be more descriptive of the algorithm than the methods used. - Commit messages: - non-infinite to finite - Use limiting - Remove use of clamping - Merge branch

Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K

2021-06-25 Thread Naoto Sato
On Fri, 25 Jun 2021 20:04:37 GMT, Weijun Wang wrote: > More refactoring to limit the scope of `@SuppressWarnings` annotations. > > Sometimes I introduce new methods. Please feel free to suggest method names > you like to use. LGTM. - Marked as reviewed by naoto (Reviewer). PR:

Re: [jdk17] RFR: 8269409: Post JEP 411 refactoring: core-libs with maximum covering > 10K [v2]

2021-06-25 Thread Weijun Wang
> More refactoring to limit the scope of `@SuppressWarnings` annotations. > > Sometimes I introduce new methods. Please feel free to suggest method names > you like to use. Weijun Wang has updated the pull request incrementally with one additional commit since the last revision: one more

Integrated: 4847239: (spec) File.createTempFile() should make it clear that it doesn't create the temporary directory

2021-06-25 Thread Brian Burkhalter
On Wed, 23 Jun 2021 00:06:25 GMT, Brian Burkhalter wrote: > Augment the specification of > `java.io.File.createTempFile(String,String,File)` to clarify its behavior > with respect to the `File` parameter `directory`. This pull request has now been integrated. Changeset: 68ef21db Author:

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

2021-06-25 Thread Joe Darcy
On 6/21/2021 2:02 PM, Paul Sandoz wrote: On Mon, 21 Jun 2021 05:17:09 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. Yi Yang has updated

[jdk17] RFR: 8269403: Fix jpackage tests to gracefully handle jpackage app launcher crashes

2021-06-25 Thread Alexey Semenyuk
jpackage app launcher randomly crashes JVM at termination in EMS enabled JDK builds. Until the root cause of the issue is understood and fixed let's add a workaround to jpackage tests to run test app few more times if the first attempt resulted in app crash. - Commit messages: -

Re: [jdk17] RFR: 8269034: AccessControlException for SunPKCS11 daemon threads [v2]

2021-06-25 Thread Valerie Peng
On Tue, 22 Jun 2021 20:08:03 GMT, Sean Coffey wrote: >> Sufficient permissions missing if this code was ever to run with >> SecurityManager. >> >> Cleanest approach appears to be use of InnocuousThread to create the >> cleaner/poller threads. >> Test case coverage extended to cover the

Re: [jdk17] RFR: 8269403: Fix jpackage tests to gracefully handle jpackage app launcher crashes

2021-06-25 Thread Alexander Matveev
On Fri, 25 Jun 2021 22:41:10 GMT, Alexey Semenyuk wrote: > jpackage app launcher randomly crashes JVM at termination in EMS enabled JDK > builds. > Until the root cause of the issue is understood and fixed let's add a > workaround to jpackage tests to run test app few more times if the first

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v3]

2021-06-25 Thread Brian Burkhalter
> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and > `read(byte[],int,int)` to return zero per the `InputStream` specification > when the byte array actual or specified length is zero. Brian Burkhalter has updated the pull request incrementally with one additional commit since

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v4]

2021-06-25 Thread Brian Burkhalter
> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and > `read(byte[],int,int)` to return zero per the `InputStream` specification > when the byte array actual or specified length is zero. Brian Burkhalter has refreshed the contents of this pull request, and previous commits have

Re: [jdk17] RFR: JDK-8266269: Lookup::accessClass fails with IAE when accessing an arrayClass with a protected inner class as component class [v2]

2021-06-25 Thread Mandy Chung
> `Lookup::accessClass` should determine the accessibility of the element type. > An array class is accessible if and only if its element type is accessible. > > This also fixes a spec bug to document `@throws NullPointerException` if the > argument is null. > > Please review the CSR: >

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

2021-06-25 Thread Joe Wang
On Wed, 23 Jun 2021 07:34:06 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

Integrated: 6633375: FileOutputStream_md.c should be merged into FileOutputStream.c

2021-06-25 Thread Brian Burkhalter
On Thu, 24 Jun 2021 20:01:27 GMT, Brian Burkhalter wrote: > Merge identical Unix and Windows versions of FileOutputStream_md.c into > single, common FileOutputStream.c. This pull request has now been integrated. Changeset: 3fae4b37 Author:Brian Burkhalter URL:

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v4]

2021-06-25 Thread Roger Riggs
On Fri, 25 Jun 2021 20:47:21 GMT, Brian Burkhalter wrote: >> Modify `java.io.ByteArrayInputStream` methods `read(byte[])` and >> `read(byte[],int,int)` to return zero per the `InputStream` specification >> when the byte array actual or specified length is zero. > > Brian Burkhalter has

Re: RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v4]

2021-06-25 Thread Brian Burkhalter
On Fri, 25 Jun 2021 20:49:16 GMT, Roger Riggs wrote: >> Brian Burkhalter has refreshed the contents of this pull request, and >> previous commits have been removed. The incremental views will show >> differences compared to the previous content of the PR. > >

[jdk17] Integrated: 8269036: tools/jpackage/share/AppImagePackageTest.java failed with "hdiutil: create failed - Resource busy"

2021-06-25 Thread Alexander Matveev
On Tue, 22 Jun 2021 21:59:43 GMT, Alexander Matveev wrote: > Looks like another "Resource busy" issue similar to recent fixes for "hdiutil > convert" and "hdiutil detach". Workaround in same way by repeating "create" > command. Modified RetryExecutor to pass write to file flag, otherwise >