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 ord

Re: blizzard of deprecation warnings related to JEP 411

2021-06-16 Thread Peter Firmstone
Hi Rick This is dependant on OpenJDK creating hooks in JVM code for existing permission's without depending existing Security infrastructure. The major components can be found here, also available on Maven: https://github.com/pfirmstone/JGDMS/blob/trunk/JGDMS/jgdms-platform/src/main/java/net/

Re: RFR: 8268427: Improve AlgorithmConstraints:checkAlgorithm performance [v2]

2021-06-16 Thread Xue-Lei Andrew Fan
On Thu, 17 Jun 2021 03:54:54 GMT, Dongbo He wrote: >> Now AlgorithmConstraints:checkAlgorithm uses List to check if an algorithm >> has been disabled. It is less efficient when there are more disabled >> elements in the list, we can use Set instead of List to speed up the search. >> >> Patch c

Re: RFR: 8268427: Improve AlgorithmConstraints:checkAlgorithm performance [v2]

2021-06-16 Thread Dongbo He
> Now AlgorithmConstraints:checkAlgorithm uses List to check if an algorithm > has been disabled. It is less efficient when there are more disabled elements > in the list, we can use Set instead of List to speed up the search. > > Patch contains a benchmark that can be run with `make test > TES

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 exact

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 pri

Re: blizzard of deprecation warnings related to JEP 411

2021-06-16 Thread Rick Hillegas
Thanks for that advice, Alan. I have rototilled @SuppressWarnings("removal") annotations across the Derby codebase and thrown more memory at javadoc so that it won't crash on JDK 11. When I run Derby's test suites, I see a blizzard of the following diagnostics:   WARNING: java.lang.System::set

[jdk17] Integrated: 8259338: Add expiry exception for identrustdstx3 alias to VerifyCACerts.java test

2021-06-16 Thread Rajan Halade
On Wed, 16 Jun 2021 18:44:30 GMT, Rajan Halade wrote: > clean backport to JDK 17. > > Reviewed-by: xuelei This pull request has now been integrated. Changeset: 54f5ffea Author:Rajan Halade URL: https://git.openjdk.java.net/jdk17/commit/54f5ffeaad9da7cc77d9b6c0339758340c42ea2e Stats

[jdk17] Integrated: 8259338: Add expiry exception for identrustdstx3 alias to VerifyCACerts.java test

2021-06-16 Thread Rajan Halade
clean backport to JDK 17. Reviewed-by: xuelei - Commit messages: - 8259338: Add expiry exception for identrustdstx3 alias to VerifyCACerts.java test Changes: https://git.openjdk.java.net/jdk17/pull/83/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=83&range=00 Iss

Re: [jdk17] RFR: 8265500: Some impls of javax.crypto.Cipher.init() do not throw UnsupportedOperationExc for unsupported modes

2021-06-16 Thread Valerie Peng
On Wed, 16 Jun 2021 18:10:05 GMT, Valerie Peng wrote: >> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java >> line 365: >> >>> 363: default: >>> 364: // should never happen; checked by Cipher.init() >>> 365: throw new Assert

Re: [jdk17] RFR: 8265500: Some impls of javax.crypto.Cipher.init() do not throw UnsupportedOperationExc for unsupported modes

2021-06-16 Thread Valerie Peng
On Wed, 16 Jun 2021 17:44:13 GMT, Xue-Lei Andrew Fan wrote: >> Could someone please help review this trivial fix? The real changes are the >> two PKCS11 cipher impl classes under >> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/. The rest of >> classes are just cleanups, e.g. dead

Re: [jdk17] RFR: 8265500: Some impls of javax.crypto.Cipher.init() do not throw UnsupportedOperationExc for unsupported modes

2021-06-16 Thread Xue-Lei Andrew Fan
On Tue, 15 Jun 2021 22:37:29 GMT, Valerie Peng wrote: > Could someone please help review this trivial fix? The real changes are the > two PKCS11 cipher impl classes under > src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/. The rest of > classes are just cleanups, e.g. dead code or un

Re: [jdk17] RFR: 8265297: javax/net/ssl/SSLSession/TestEnabledProtocols.java failed with "RuntimeException: java.net.SocketException: Connection reset"

2021-06-16 Thread Rajan Halade
On Wed, 16 Jun 2021 14:24:31 GMT, Fernando Guallini wrote: > The following test: javax/net/ssl/SSLSession/TestEnabledProtocols.java, is > failing intermittently because the client side is expecting a SocketException > only if it is wrapped into a SSLException, but it should also expect a > So

Integrated: 8259338: Add expiry exception for identrustdstx3 alias to VerifyCACerts.java test

2021-06-16 Thread Rajan Halade
On Tue, 15 Jun 2021 22:20:23 GMT, Rajan Halade wrote: > Test is updated to add expiry exception for "identrustdstx3 [jdk]" alias. This pull request has now been integrated. Changeset: b836b83b Author:Rajan Halade URL: https://git.openjdk.java.net/jdk/commit/b836b83b2aefbc87b0cf26990

Re: RFR: 8259338: Add expiry exception for identrustdstx3 alias to VerifyCACerts.java test

2021-06-16 Thread Xue-Lei Andrew Fan
On Tue, 15 Jun 2021 22:20:23 GMT, Rajan Halade wrote: > Test is updated to add expiry exception for "identrustdstx3 [jdk]" alias. Marked as reviewed by xuelei (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/4500

Re: [jdk17] RFR: 8265297: javax/net/ssl/SSLSession/TestEnabledProtocols.java failed with "RuntimeException: java.net.SocketException: Connection reset"

2021-06-16 Thread Xue-Lei Andrew Fan
On Wed, 16 Jun 2021 14:24:31 GMT, Fernando Guallini wrote: > The following test: javax/net/ssl/SSLSession/TestEnabledProtocols.java, is > failing intermittently because the client side is expecting a SocketException > only if it is wrapped into a SSLException, but it should also expect a > So

Re: blizzard of deprecation warnings related to JEP 411

2021-06-16 Thread Rick Hillegas
Thanks, Peter. Derby supports a couple authorization mechanisms, the most important one being the role-based SQL Standard GRANT/REVOKE commands (see https://db.apache.org/derby/docs/10.15/security/csecauthorization.html). I'm afraid that my old eyes didn't see a link to your authorization libr

[jdk17] RFR: 8265297: javax/net/ssl/SSLSession/TestEnabledProtocols.java failed with "RuntimeException: java.net.SocketException: Connection reset"

2021-06-16 Thread Fernando Guallini
The following test: javax/net/ssl/SSLSession/TestEnabledProtocols.java, is failing intermittently because the client side is expecting a SocketException only if it is wrapped into a SSLException, but it should also expect a SocketException when there is no exception chaining. - Com

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 re

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. > > src/java.base/share/c

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 Сергей Цыпанов
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 https://bugs.op

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. src/java.base/share/classe

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. > > src/java.base/share/cla

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 Webre