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

2021-06-17 Thread Yi Yang
On Thu, 17 Jun 2021 10:19:43 GMT, Alan Bateman wrote: >> Yi Yang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> restore IndexOfOufBoundsException; split exception line > >

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

2021-06-17 Thread Yi Yang
> 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 the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8266182: Create a manual test for jdk/sun/security/pkcs12/ParamsTest.java [v2]

2021-06-17 Thread Abdul Kolarkunnu
> ParamsTest is an interop test between keytool <-> openssl. There are some > manual steps listed in jdk/sun/security/pkcs12/params/README to perform after > the execution of jtreg execution. So this test is to perform that manual > steps. Abdul Kolarkunnu has updated the pull request

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

2021-06-17 Thread Xue-Lei Andrew Fan
On Fri, 18 Jun 2021 04:56:25 GMT, Dongbo He wrote: >> The checkAlgorithm is using equalsIgnoreCase(), so it is safe for it. My >> concern is mainly about the keywords, like "keySize" used the property, not >> really the algorithm name. It is good to keep the current case sensitive >>

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

2021-06-17 Thread Dongbo He
On Fri, 18 Jun 2021 04:14:09 GMT, Xue-Lei Andrew Fan wrote: >> [checkAlgorithm](https://github.com/openjdk/jdk/blob/a051e735cda0d5ee5cb6ce0738aa549a7319a28c/src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java#L94) >> check whether the item is in the collection by

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

2021-06-17 Thread Xue-Lei Andrew Fan
On Fri, 18 Jun 2021 01:54:30 GMT, Dongbo He wrote: >> Sorry, I missed a "case" in the original comment (corrected). I meant to >> keep the property case sensitive in the hash set so that the keywords like >> "keySize" could be used correctly. > >

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

2021-06-17 Thread Peter Firmstone
On 18/06/2021 1:18 pm, Peter Firmstone wrote: On 16/06/2021 11:18 pm, David Lloyd wrote: On Mon, Jun 14, 2021 at 6:47 PM Peter Firmstone wrote: Permission references can be replaced with Guard references (which Permissions are instances of). I guess you've got something fairly complex in

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

2021-06-17 Thread Peter Firmstone
On 16/06/2021 11:18 pm, David Lloyd wrote: On Mon, Jun 14, 2021 at 6:47 PM Peter Firmstone wrote: Permission references can be replaced with Guard references (which Permissions are instances of). I guess you've got something fairly complex in mind, could you give some practical examples of

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v5]

2021-06-17 Thread Jaikiran Pai
On Thu, 17 Jun 2021 17:21:04 GMT, Weijun Wang wrote: >> More loudly and precise warning messages when a security manager is either >> enabled at startup or installed at runtime. >> >> This is new PR for the `openjdk/jdk17` repo copied from >> https://github.com/openjdk/jdk/pull/4400. A new

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v5]

2021-06-17 Thread Jaikiran Pai
On Thu, 17 Jun 2021 17:21:04 GMT, Weijun Wang wrote: >> More loudly and precise warning messages when a security manager is either >> enabled at startup or installed at runtime. >> >> This is new PR for the `openjdk/jdk17` repo copied from >> https://github.com/openjdk/jdk/pull/4400. A new

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

2021-06-17 Thread Dongbo He
On Thu, 17 Jun 2021 16:08:15 GMT, Xue-Lei Andrew Fan wrote: >> I did not get the point to use TreeSet. Is it sufficient if the >> toLowerCase() is not added (and don't compare keywords like "keySize" by >> ignoring cases)? >> >> >> - algorithmsInProperty[i] =

[jdk17] Integrated: 8268678: LetsEncryptCA.java test fails as Let’s Encrypt Authority X3 is retired

2021-06-17 Thread Rajan Halade
On Fri, 18 Jun 2021 00:54:43 GMT, Rajan Halade wrote: > clean backport to JDK 17 > > Reviewed-by: xuelei This pull request has now been integrated. Changeset: 483f1ee2 Author:Rajan Halade URL: https://git.openjdk.java.net/jdk17/commit/483f1ee211bc0e37b486eb9d38d283ff02f0bdcc

[jdk17] Integrated: 8268678: LetsEncryptCA.java test fails as Let’s Encrypt Authority X3 is retired

2021-06-17 Thread Rajan Halade
clean backport to JDK 17 Reviewed-by: xuelei - Commit messages: - 8268678: LetsEncryptCA.java test fails as Let’s Encrypt Authority X3 is retired Changes: https://git.openjdk.java.net/jdk17/pull/94/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk17=94=00 Issue:

Integrated: Merge jdk17

2021-06-17 Thread Jesper Wilhelmsson
On Thu, 17 Jun 2021 23:26:26 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 17 -> JDK 18 This pull request has now been integrated. Changeset: a051e735 Author:Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/a051e735cda0d5ee5cb6ce0738aa549a7319a28c Stats: 845

Integrated: 8268678: LetsEncryptCA.java test fails as Let’s Encrypt Authority X3 is retired

2021-06-17 Thread Rajan Halade
On Thu, 17 Jun 2021 23:10:58 GMT, Rajan Halade wrote: > See the bug for more details. > > - Intermediate root cert R3 doesn't specify OCSP responder and end entity > test certificates doesn't specify CRLs > - New test artifacts are available but revoked expires on July 7th, 2021 and > valid

Re: RFR: 8268678: LetsEncryptCA.java test fails as Let’s Encrypt Authority X3 is retired

2021-06-17 Thread Xue-Lei Andrew Fan
On Thu, 17 Jun 2021 23:10:58 GMT, Rajan Halade wrote: > See the bug for more details. > > - Intermediate root cert R3 doesn't specify OCSP responder and end entity > test certificates doesn't specify CRLs > - New test artifacts are available but revoked expires on July 7th, 2021 and > valid

RFR: Merge jdk17

2021-06-17 Thread Jesper Wilhelmsson
Forwardport JDK 17 -> JDK 18 - Commit messages: - Merge - 8268371: C2: assert(_gvn.type(obj)->higher_equal(tjp)) failed: cast_up is no longer needed - 8268676: assert(!ik->is_interface() && !ik->has_subklass()) failed: inconsistent klass hierarchy - 8268265:

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

2021-06-17 Thread Valerie Peng
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

RFR: 8268678: LetsEncryptCA.java test fails as Let’s Encrypt Authority X3 is retired

2021-06-17 Thread Rajan Halade
See the bug for more details. - Intermediate root cert R3 doesn't specify OCSP responder and end entity test certificates doesn't specify CRLs - New test artifacts are available but revoked expires on July 7th, 2021 and valid on August 31st, 2021. so backdated validity check is performed for

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v4]

2021-06-17 Thread Weijun Wang
On Thu, 17 Jun 2021 14:55:02 GMT, Weijun Wang wrote: >> More loudly and precise warning messages when a security manager is either >> enabled at startup or installed at runtime. >> >> This is new PR for the `openjdk/jdk17` repo copied from >> https://github.com/openjdk/jdk/pull/4400. A new

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v5]

2021-06-17 Thread Weijun Wang
> More loudly and precise warning messages when a security manager is either > enabled at startup or installed at runtime. > > This is new PR for the `openjdk/jdk17` repo copied from > https://github.com/openjdk/jdk/pull/4400. A new commit is added. Weijun Wang has updated the pull request

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v4]

2021-06-17 Thread Weijun Wang
On Thu, 17 Jun 2021 16:27:41 GMT, Alan Bateman wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add bug id into a test > > src/java.base/share/classes/java/lang/System.java line 330: > >> 328: >> 329: //

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v4]

2021-06-17 Thread Alan Bateman
On Thu, 17 Jun 2021 14:55:02 GMT, Weijun Wang wrote: >> More loudly and precise warning messages when a security manager is either >> enabled at startup or installed at runtime. >> >> This is new PR for the `openjdk/jdk17` repo copied from >> https://github.com/openjdk/jdk/pull/4400. A new

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

2021-06-17 Thread Fernando Guallini
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 >

Re: RFR: JDK-8268464 : Remove dependancy of TestHttpsServer, HttpTransaction, HttpCallback from open/test/jdk/sun/net/www/protocol/https/ tests [v4]

2021-06-17 Thread Mahendra Chhipa
> …HttpCallback from open/test/jdk/sun/net/www/protocol/https/ tests Mahendra Chhipa has updated the pull request incrementally with one additional commit since the last revision: Implemented review comments - Changes: - all: https://git.openjdk.java.net/jdk/pull/4432/files

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

2021-06-17 Thread Xue-Lei Andrew Fan
On Thu, 17 Jun 2021 15:59:45 GMT, Xue-Lei Andrew Fan wrote: >> If we keep property sensitive, we may need to use TreeSet. I have updated >> the PR with TreeSet. Fortunately, the performance hasn't changed much. > > I did not get the point to use TreeSet. Is it sufficient if the >

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

2021-06-17 Thread Xue-Lei Andrew Fan
On Thu, 17 Jun 2021 12:05:28 GMT, Dongbo He wrote: >> src/java.base/share/classes/sun/security/util/AbstractAlgorithmConstraints.java >> line 72: >> >>> 70: algorithmsInProperty = property.split(","); >>> 71: for (int i = 0; i < algorithmsInProperty.length; i++) { >>>

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

2021-06-17 Thread Paul Sandoz
On Thu, 17 Jun 2021 10:21:35 GMT, Alan Bateman 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. > >

Re: blizzard of deprecation warnings related to JEP 411

2021-06-17 Thread Rick Hillegas
On 6/17/21 4:56 AM, Alan Bateman wrote: On 17/06/2021 00:30, Rick Hillegas wrote: 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

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v4]

2021-06-17 Thread Sean Mullan
On Thu, 17 Jun 2021 14:27:30 GMT, Weijun Wang wrote: >> test/jdk/java/security/ProtectionDomain/RecursionDebug.java line 91: >> >>> 89: } >>> 90: >>> 91: System.setSecurityManager(null); >> >> Why did this line need to be removed? > > This is where the `setSecurityManager`

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v4]

2021-06-17 Thread Sean Mullan
On Thu, 17 Jun 2021 14:55:02 GMT, Weijun Wang wrote: >> More loudly and precise warning messages when a security manager is either >> enabled at startup or installed at runtime. >> >> This is new PR for the `openjdk/jdk17` repo copied from >> https://github.com/openjdk/jdk/pull/4400. A new

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v4]

2021-06-17 Thread Weijun Wang
> More loudly and precise warning messages when a security manager is either > enabled at startup or installed at runtime. > > This is new PR for the `openjdk/jdk17` repo copied from > https://github.com/openjdk/jdk/pull/4400. A new commit is added. Weijun Wang has updated the pull request

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v3]

2021-06-17 Thread Weijun Wang
On Thu, 17 Jun 2021 14:05:40 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> new warning text again (6/14) > > test/jdk/java/security/ProtectionDomain/RecursionDebug.java line 91: > >> 89:

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v3]

2021-06-17 Thread Weijun Wang
On Thu, 17 Jun 2021 14:02:35 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> new warning text again (6/14) > > test/jdk/java/lang/System/SecurityManagerWarnings.java line 38: > >> 36: import

Re: [jdk17] RFR: 8268349: Provide clear run-time warnings about Security Manager deprecation [v3]

2021-06-17 Thread Sean Mullan
On Mon, 14 Jun 2021 22:34:03 GMT, Weijun Wang wrote: >> More loudly and precise warning messages when a security manager is either >> enabled at startup or installed at runtime. >> >> This is new PR for the `openjdk/jdk17` repo copied from >> https://github.com/openjdk/jdk/pull/4400. A new

RFR: 8268965: TCP Connection Reset when connecting simple socket to SSL server

2021-06-17 Thread Alexey Bakhtin
Please review the fix for JDK-8268965. The new jtreg test is added for the described issue. sun/security/ssl and javax/net/ssl tests are passed - Commit messages: - 8268965: TCP Connection Reset when connecting simple socket to SSL server Changes:

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

2021-06-17 Thread David Holmes
On 17/06/2021 8:50 pm, Alan Bateman wrote: On Thu, 17 Jun 2021 05:16:14 GMT, David Holmes wrote: There are a lot more tests than just tier1. :) I don't expect many, if any, tests to be looking for a specific IOOBE message, and I can't see an easy way to find such tests without running them.

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

2021-06-17 Thread Dongbo He
On Thu, 17 Jun 2021 08:16:42 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

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

2021-06-17 Thread Dongbo He
On Thu, 17 Jun 2021 04:43:27 GMT, Xue-Lei Andrew Fan wrote: >> Dongbo He has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Make getAlgorithms() method return a Set > >

Re: blizzard of deprecation warnings related to JEP 411

2021-06-17 Thread Alan Bateman
On 17/06/2021 00:30, Rick Hillegas wrote: 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

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

2021-06-17 Thread Alan Bateman
On Thu, 17 Jun 2021 05:16:14 GMT, David Holmes wrote: > There are a lot more tests than just tier1. :) I don't expect many, if any, > tests to be looking for a specific IOOBE message, and I can't see an easy way > to find such tests without running them. If core-libs folk are okay with this >

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

2021-06-17 Thread Alan Bateman
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 looked through the changes in java.base and only spotted

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

2021-06-17 Thread Сергей Цыпанов
On Wed, 16 Jun 2021 09:49:17 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/sun/net/www/protocol/https/HttpsClient.java line >> 154: >> >>> 152: while (tokenizer.hasMoreTokens()) >>> 153: v.add(tokenizer.nextToken()); >>> 154: ciphers = new

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

2021-06-17 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 >