Re: RFR: 8294241: Deprecate URL public constructors [v2]

2022-10-31 Thread Alan Bateman
On Mon, 31 Oct 2022 22:00:01 GMT, Phil Race wrote: > You have jumped through some refactoring hoops to be able to apply the > deprecation suppression to as little code as possible .. having made such > changes, then why didn't you just make the recommended change instead ? > > Should I presume

Re: RFR: 8294241: Deprecate URL public constructors [v2]

2022-10-31 Thread Peter Firmstone
Some additional information that may be helpful: org.apache.river.api.net.Uri has method signatures in common with java.net.URI, due to its development history. The implementation was originally part of Apache Harmony which was RFC2396 compliant (Harmony's implementation of java.net.URI)

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-10-31 Thread David Schlosnagle
On Mon, 31 Oct 2022 20:11:34 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread David Schlosnagle
On Fri, 28 Oct 2022 20:04:18 GMT, Rémi Forax wrote: >> But it's an implementation details, BTW i wonder if the limitation is still >> valid, i know that John has changed the implementation of the BSM in that >> area. > > Anyway, i think you are right, this can be public If this is a public int

TLS Performance Regression in JDK18+

2022-10-31 Thread Carter Kozak
Hello, TLS performance has appreciably regressed in JDK-18 and JDK-19 from earlier releases using TLS_AES_128_GCM_SHA256 and TLS_AES_256_GCM_SHA384 ciphers. I suspect the throughput reduction is in part related to the substantial increase in allocation per operation by roughly the size of the c

Re: RFR: 8294241: Deprecate URL public constructors [v2]

2022-10-31 Thread Phil Race
On Fri, 28 Oct 2022 14:54:26 GMT, Daniel Fuchs wrote: >> Deprecate URL constructors. Developers are encouraged to use `java.net.URI` >> to parse or construct any URL. >> >> The `java.net.URL` class does not itself encode or decode any URL components >> according to the escaping mechanism defin

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-10-31 Thread Stuart Marks
On Mon, 31 Oct 2022 20:11:34 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-10-31 Thread Rémi Forax
On Mon, 31 Oct 2022 20:11:34 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-10-31 Thread Rémi Forax
On Mon, 31 Oct 2022 20:11:34 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evalu

Re: RFR: 8295011: EC point multiplication improvement for secp256r1 [v3]

2022-10-31 Thread Xue-Lei Andrew Fan
On Mon, 31 Oct 2022 20:29:23 GMT, Sean Mullan wrote: > Can you please wait a few days on integrating this? I would like @ferakocz > and/or @mcpowers to also look at this. Sure. I'd appreciate if the review could be done by the end of this week. - PR: https://git.openjdk.org/jdk/p

Re: RFR: 8295011: EC point multiplication improvement for secp256r1 [v3]

2022-10-31 Thread Sean Mullan
On Fri, 28 Oct 2022 18:05:30 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The EC point multiplication for secp256r1 could be improved for better >> performance, by using more efficient algorithm and pre-computation. >> Improvement for other curves are si

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v7]

2022-10-31 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation a

Integrated: JDK-8291974 PrivateCredentialPermission should not use local variable to enable debugging

2022-10-31 Thread Mark Powers
On Wed, 7 Sep 2022 19:49:53 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-8291974 This pull request has now been integrated. Changeset: 8480f870 Author:Mark Powers Committer: Sean Mullan URL: https://git.openjdk.org/jdk/commit/8480f87044f72e0312add190e75ee27030b7e10

Re: RFR: 8296072: CertAttrSet::encode and DerEncoder::derEncode should write into DerOutputStream [v5]

2022-10-31 Thread Sean Mullan
On Mon, 31 Oct 2022 19:53:32 GMT, Weijun Wang wrote: >> The argument of the `CertAttrSet::encode` and `DerEncoder::derEncode` >> interface methods are modified from `OutputStream` to `DerOutputStream`. All >> implementations are modified the same way. >> >> `OutputStream` is still used by >>

Re: RFR: 8296072: CertAttrSet::encode and DerEncoder::derEncode should write into DerOutputStream [v5]

2022-10-31 Thread Weijun Wang
> The argument of the `CertAttrSet::encode` and `DerEncoder::derEncode` > interface methods are modified from `OutputStream` to `DerOutputStream`. All > implementations are modified the same way. > > `OutputStream` is still used by > `sun.security.x509.Extension::encode(OutputStream os)` becaus

Re: RFR: JDK-8291974 PrivateCredentialPermission should not use local variable to enable debugging [v5]

2022-10-31 Thread Sean Mullan
On Mon, 31 Oct 2022 15:59:28 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291974 > > Mark Powers 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

Re: RFR: 8296072: CertAttrSet::encode and DerEncoder::derEncode should write into DerOutputStream [v4]

2022-10-31 Thread Sean Mullan
On Mon, 31 Oct 2022 19:06:39 GMT, Weijun Wang wrote: >> The argument of the `CertAttrSet::encode` and `DerEncoder::derEncode` >> interface methods are modified from `OutputStream` to `DerOutputStream`. All >> implementations are modified the same way. >> >> `OutputStream` is still used by >>

Re: RFR: 8296072: CertAttrSet::encode and DerEncoder::derEncode should write into DerOutputStream [v4]

2022-10-31 Thread Weijun Wang
> The argument of the `CertAttrSet::encode` and `DerEncoder::derEncode` > interface methods are modified from `OutputStream` to `DerOutputStream`. All > implementations are modified the same way. > > `OutputStream` is still used by > `sun.security.x509.Extension::encode(OutputStream os)` becaus

Re: RFR: 8296072: CertAttrSet::encode and DerEncoder::derEncode should write into DerOutputStream [v3]

2022-10-31 Thread Sean Mullan
On Mon, 31 Oct 2022 18:26:25 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> same for DerEncoder::derEncode >> >> only in patch2: >> unchanged: > > src/java.base/share/classes/sun/security/pk

Re: RFR: 8296072: CertAttrSet::encode and DerEncoder::derEncode should write into DerOutputStream [v3]

2022-10-31 Thread Sean Mullan
On Fri, 28 Oct 2022 22:04:39 GMT, Weijun Wang wrote: >> The argument of the `CertAttrSet::encode` and `DerEncoder::derEncode` >> interface methods are modified from `OutputStream` to `DerOutputStream`. All >> implementations are modified the same way. >> >> `OutputStream` is still used by >>

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v6]

2022-10-31 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation a

Re: RFR: 8295011: EC point multiplication improvement for secp256r1 [v3]

2022-10-31 Thread Xue-Lei Andrew Fan
On Fri, 28 Oct 2022 18:05:30 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The EC point multiplication for secp256r1 could be improved for better >> performance, by using more efficient algorithm and pre-computation. >> Improvement for other curves are si

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v2]

2022-10-31 Thread Xue-Lei Andrew Fan
On Mon, 31 Oct 2022 17:19:21 GMT, Xue-Lei Andrew Fan wrote: >>> BigInteger exponentiation time also depends on also depends on the base; >>> quick benchmark: `BigInteger.ONE.modPow(mod.subtract(BigInteger.TWO), mod)` >>> vs `BigInteger.TWO.modPow(mod.subtract(BigInteger.TWO), mod)`: >>> >>> ``

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v2]

2022-10-31 Thread Xue-Lei Andrew Fan
On Mon, 10 Oct 2022 08:21:57 GMT, Ferenc Rakoczi wrote: > ... you only have one chance to measure, so cannot average out noise ... There are cases that one chance is enough to place an attack. We normally don't discuss vulnerability details in public, please send me an email in private if mor

Re: RFR: 8296072: CertAttrSet::encode and DerEncoder::derEncode should write into DerOutputStream [v3]

2022-10-31 Thread Xue-Lei Andrew Fan
On Fri, 28 Oct 2022 22:04:39 GMT, Weijun Wang wrote: >> The argument of the `CertAttrSet::encode` and `DerEncoder::derEncode` >> interface methods are modified from `OutputStream` to `DerOutputStream`. All >> implementations are modified the same way. >> >> `OutputStream` is still used by >>

Integrated: 8256660: Disable DTLS 1.0

2022-10-31 Thread Sean Mullan
On Fri, 28 Oct 2022 17:00:12 GMT, Sean Mullan wrote: > Disable DTLS 1.0 by default. This version of DTLS has weakened over time and > lacks support for stronger cipher suites. DTLS 1.0 correlates with version > 1.1 of TLS which has already been disabled by default in JDK 16. The IETF has > dep

Re: RFR: JDK-8291974 PrivateCredentialPermission should not use local variable to enable debugging [v5]

2022-10-31 Thread Sean Mullan
On Mon, 31 Oct 2022 15:59:28 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291974 > > Mark Powers 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

Re: RFR: JDK-8291974 PrivateCredentialPermission should not use local variable to enable debugging [v5]

2022-10-31 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8291974 Mark Powers 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 seven additional commits since the last revis

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Rémi Forax
On Mon, 31 Oct 2022 13:02:18 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/template/StringTemplate.java line 149: >> >>> 147: * {@return the interpolation of the StringTemplate} >>> 148: */ >>> 149: default String interpolate() { >> >> I wonder if all the default

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v5]

2022-10-31 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation a

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v3]

2022-10-31 Thread Weijun Wang
On Mon, 31 Oct 2022 14:58:02 GMT, Xue-Lei Andrew Fan wrote: >> Xue-Lei Andrew Fan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> more improvement > > Reviewer approval is required. Anyone has cycle? Thanks! Hi @XueleiFan, can you wai

Re: RFR: JDK-8291974 PrivateCredentialPermission should not use local variable to enable debugging [v4]

2022-10-31 Thread Sean Mullan
On 10/31/22 11:02 AM, Mark Powers wrote: On Mon, 10 Oct 2022 21:04:46 GMT, Sean Mullan wrote: Mark Powers has updated the pull request incrementally with one additional commit since the last revision: Sean comments test/jdk/javax/security/auth/PrivateCredentialPermission/Serial2.java

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v3]

2022-10-31 Thread John Jiang
On Sat, 8 Oct 2022 15:34:57 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this patch reviewed? >> >> This is one of a few steps to improve the EC performance. The multiplicative >> inverse implementation could be improved for better performance. >> >> For secp256r1 prime p, the curr

Re: RFR: 8295011: EC point multiplication improvement for secp256r1 [v3]

2022-10-31 Thread John Jiang
On Fri, 28 Oct 2022 18:05:30 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The EC point multiplication for secp256r1 could be improved for better >> performance, by using more efficient algorithm and pre-computation. >> Improvement for other curves are si

Re: RFR: JDK-8291974 PrivateCredentialPermission should not use local variable to enable debugging [v4]

2022-10-31 Thread Mark Powers
On Mon, 10 Oct 2022 21:04:46 GMT, Sean Mullan wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Sean comments > > test/jdk/javax/security/auth/PrivateCredentialPermission/Serial2.java line 35: > >> 33: import java.ut

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:45:55 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/util/FormatProcessor.java line 198: > >> 196: *

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v4]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 23:50:11 GMT, j3graham wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove .orig file > > src/java.base/share/classes/java/util/FormatterBuilder.java line 470: > >> 468: */ >> 469: Me

Re: RFR: 8294731: Improve multiplicative inverse for secp256r1 implementation [v3]

2022-10-31 Thread Xue-Lei Andrew Fan
On Sat, 8 Oct 2022 15:34:57 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this patch reviewed? >> >> This is one of a few steps to improve the EC performance. The multiplicative >> inverse implementation could be improved for better performance. >> >> For secp256r1 prime p, the curr

Re: RFR: 8295011: EC point multiplication improvement for secp256r1 [v3]

2022-10-31 Thread Xue-Lei Andrew Fan
On Fri, 28 Oct 2022 18:05:30 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The EC point multiplication for secp256r1 could be improved for better >> performance, by using more efficient algorithm and pre-computation. >> Improvement for other curves are si

Re: RFR: 8295011: EC point multiplication improvement for secp256r1 [v3]

2022-10-31 Thread Xue-Lei Andrew Fan
On Mon, 31 Oct 2022 07:08:54 GMT, Daniel Jeliński wrote: > It would be nice to add a test / consistency check, verifying that: The current tests could be used to verify the tables. As the fields are private, it is not easy to add a test. But I will try in the follow-up change that hardcodes

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:36:07 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 325: > >> 323

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:39:01 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 389: > >> 387

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:33:38 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 289: > >> 287

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:26:20 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 79: > >> 77:

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:57:41 GMT, Rémi Forax wrote: >> `List.of()` can't be used here, since the elements are nullable, according >> to the documentation. But the the returned list can still be modified, by >> changing the given `elements` array. The input array must be explicitly >> copied: >

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:20:40 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/TemplateRuntime.java line 45: > >> 43:

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Mon, 31 Oct 2022 07:14:45 GMT, Rémi Forax wrote: >> Actually, `StringTemplate::interpolate` is fine, as this method takes two  >> parameters, whereas the instance method only takes an implicit `this`  >> parameter. >> >> The instance method is only assignable to `Function` >> or `Supplier`,

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:12:02 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/StringTemplate.java line 307: > >> 305:

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:08:56 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/StringTemplate.java line 149: > >> 147:

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:06:43 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/StringTemplate.java line 175: > >> 173:

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 19:05:10 GMT, Rémi Forax wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update TemplateRuntime::combine > > src/java.base/share/classes/java/lang/template/StringTemplate.java line 29: > >> 27:

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 20:07:35 GMT, Rémi Forax wrote: >> The defensive copies are done by the callers. > > In that case, i wonder if not not better to move that record inside another > class, closer to where the callers are Moving to TemplateRuntime - PR: https://git.openjdk.org/jdk

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Jim Laskey
On Fri, 28 Oct 2022 20:23:26 GMT, Rémi Forax wrote: >> Wrong use case. Think `StringProcessor upper = st -> >> st.interpolate().toUpperCase();` > > Is it that different from`TemplateProcessor upper = st -> > st.interpolate().toUpperCase();` ? > > People are really used to use <> with the funct

Re: RFR: JDK-8293412 Remove unnecessary java.security.egd overrides

2022-10-31 Thread Daniel Jeliński
On Fri, 14 Oct 2022 21:49:07 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-8293412 I'm still verifying the jarsigner and the SecurityTools changes, but all of the other files actually need the EGD override. test/jdk/java/security/SecureRandom/ApiTest.java line 56: > 54: > 55:

Re: RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview) [v3]

2022-10-31 Thread Rémi Forax
On Sat, 29 Oct 2022 00:56:18 GMT, ExE Boss wrote: >> src/java.base/share/classes/java/lang/template/StringTemplate.java line 323: >> >>> 321: * @throws NullPointerException fragments or values is null or if >>> any of the fragments is null >>> 322: */ >>> 323: public static String

Re: RFR: 8295011: EC point multiplication improvement for secp256r1 [v3]

2022-10-31 Thread Daniel Jeliński
On Fri, 28 Oct 2022 18:05:30 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? >> >> The EC point multiplication for secp256r1 could be improved for better >> performance, by using more efficient algorithm and pre-computation. >> Improvement for other curves are si