Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v9]

2022-09-15 Thread Mark Powers
On Wed, 14 Sep 2022 23:15:29 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > final comments from Max Thanks Sean and Max for being tenacious reviewing t

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v9]

2022-09-14 Thread Weijun Wang
On Wed, 14 Sep 2022 23:15:29 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > final comments from Max Marked as reviewed by weijun (Reviewer). -

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v9]

2022-09-14 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8291509 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: final comments from Max - Changes: - all: https://git.openjdk.org/jdk/pull/9972/files - new: https://git.openjdk.org/jdk/pu

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v8]

2022-09-14 Thread Mark Powers
On Wed, 14 Sep 2022 19:44:52 GMT, Weijun Wang wrote: >> Fixed. Throwing exception sooner rather than later. > > Some final comments. > > 1. Move the definition of `namedParams` inside the if block it is used and > merge with the assignment line. > 2. Change `if (ecParams == null)` to `else`, an

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v8]

2022-09-14 Thread Mark Powers
On Wed, 14 Sep 2022 19:52:34 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> final comments from Max > > src/java.base/share/classes/sun/security/provider/certpath/ForwardBuilder.java > line 572: >

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v8]

2022-09-14 Thread Weijun Wang
On Wed, 14 Sep 2022 13:48:19 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > final comments from Max Almost done. I only have 2 comments on `ssl/ECDHCli

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v7]

2022-09-14 Thread Weijun Wang
On Wed, 14 Sep 2022 13:50:55 GMT, Mark Powers wrote: >> I did as you suggested and did a bit more with the indentation. > > I reworked it again. Take a look. Looks good. Thanks. - PR: https://git.openjdk.org/jdk/pull/9972

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v7]

2022-09-14 Thread Weijun Wang
On Wed, 14 Sep 2022 03:14:23 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/ssl/SSLExtensions.java line 307: >> >>> 305: // extension_data >>> length(2) >>> 306: } >>> 307: encodedLength +=

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v8]

2022-09-14 Thread Weijun Wang
On Wed, 14 Sep 2022 03:14:33 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/ssl/ECDHClientKeyExchange.java line >> 289: >> >>> 287: } >>> 288: >>> 289: // Can't figure this out, bail. >> >> Maybe we should instead check if `namedParams` is null on

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v7]

2022-09-14 Thread Mark Powers
On Wed, 14 Sep 2022 03:14:29 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/ssl/SSLCipher.java line 70: >> >>> 68: @SuppressWarnings({"unchecked", "rawtypes"}) >>> 69: B_NULL("NULL", NULL_CIPHER, 0, 0, 0, 0, true, true, >>> 70: new Map.Entry[] { >> >> It

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v8]

2022-09-14 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8291509 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: final comments from Max - Changes: - all: https://git.openjdk.org/jdk/pull/9972/files - new: https://git.openjdk.org/jdk/pu

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v7]

2022-09-13 Thread Mark Powers
On Wed, 7 Sep 2022 01:41:14 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comments from Max and Sean > > src/java.base/share/classes/sun/security/ssl/ECDHClientKeyExchange.java line > 289: > >>

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-13 Thread Mark Powers
On Tue, 6 Sep 2022 22:48:00 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> white space > > src/java.base/share/classes/sun/security/ssl/CertificateMessage.java line 610: > >> 608: X509

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-08 Thread Weijun Wang
On Fri, 2 Sep 2022 18:48:32 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > white space src/java.base/share/classes/sun/security/ssl/CertificateMessage.

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v7]

2022-09-08 Thread Weijun Wang
On Wed, 7 Sep 2022 14:40:23 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > comments from Max and Sean This is my last part of code review. Most trivial

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v7]

2022-09-07 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8291509 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: comments from Max and Sean - Changes: - all: https://git.openjdk.org/jdk/pull/9972/files - new: https://git.openjdk.org/jdk

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-06 Thread Mark Powers
On Tue, 6 Sep 2022 22:37:21 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/provider/certpath/CertId.java line >> 226: >> >>> 224: "\nissuerKeyHash: \n" + >>> 225: encoder.encode(issuerKeyHash) + >>> 226: "\n" + certSerialNumbe

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-06 Thread Mark Powers
On Tue, 6 Sep 2022 16:24:01 GMT, Sean Mullan wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> white space > > src/java.base/share/classes/sun/security/provider/AbstractDrbg.java line 81: > >> 79: * does not nee

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-06 Thread Weijun Wang
On Tue, 6 Sep 2022 20:36:27 GMT, Sean Mullan wrote: >> My understanding: In regex, there is no need to escape `"`, so `"` is the >> same as `"`. > > Ok,but the regex is `"\\""`, so shouldn't it keep the double-backslash at the > beginning (`\`)?, i.e.: > > `...replaceAll("\"", "\\""));` T

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-06 Thread Sean Mullan
On Fri, 2 Sep 2022 18:48:32 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > white space some more comments ... mostly minor stuff. src/java.base/share/

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-06 Thread Sean Mullan
On Tue, 6 Sep 2022 17:53:32 GMT, Weijun Wang wrote: >> src/java.base/share/classes/sun/security/provider/PolicyParser.java line >> 1180: >> >>> 1178: // and then in a java string, it's escaped again >>> 1179: >>> 1180: out.print(name.replaceAll("", >>> "\\\

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-06 Thread Weijun Wang
On Fri, 2 Sep 2022 04:16:04 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/tools/keytool/Main.java line 3534: >> >>> 3532: Object[] source = {alias}; >>> 3533: if (otherKeyPass != null) { >>> 3534: System.err.println(form.format(source

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-06 Thread Weijun Wang
On Fri, 2 Sep 2022 01:02:26 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/tools/keytool/Main.java line 183: >> >>> 181: private List weakWarnings = new ArrayList<>(); >>> 182: >>> 183: private Set trustedCerts = new HashSet<>(); >> >> Put all these `final`s in one

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-06 Thread Weijun Wang
On Tue, 6 Sep 2022 16:59:38 GMT, Sean Mullan wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> white space > > src/java.base/share/classes/sun/security/provider/PolicyParser.java line 1180: > >> 1178:

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-06 Thread Sean Mullan
On Fri, 2 Sep 2022 18:48:32 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > white space reviewed up to certpath dir. src/java.base/share/classes/sun/se

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v6]

2022-09-02 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8291509 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: white space - Changes: - all: https://git.openjdk.org/jdk/pull/9972/files - new: https://git.openjdk.org/jdk/pull/9972/file

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v5]

2022-09-02 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8291509 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: comments from Max - Changes: - all: https://git.openjdk.org/jdk/pull/9972/files - new: https://git.openjdk.org/jdk/pull/997

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-09-02 Thread Mark Powers
On Thu, 1 Sep 2022 02:49:16 GMT, Weijun Wang wrote: >> Can't argue with that. > > Normally we use `SHA2_GROUP`. There are underscores between the words. Added underscores. - PR: https://git.openjdk.org/jdk/pull/9972

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-02 Thread Mark Powers
On Thu, 1 Sep 2022 14:31:53 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comments from Sean and Max > > src/java.base/share/classes/sun/security/x509/AlgIdDSA.java line 50: > >> 48: * operation

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Mark Powers
On Thu, 1 Sep 2022 03:40:41 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comments from Sean and Max > > src/java.base/share/classes/sun/security/rsa/RSAPadding.java line 335: > >> 333: priva

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Mark Powers
On Thu, 1 Sep 2022 03:31:32 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comments from Sean and Max > > src/java.base/share/classes/sun/security/tools/keytool/Main.java line 183: > >> 181: p

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Mark Powers
On Thu, 1 Sep 2022 03:02:57 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comments from Sean and Max > > src/java.base/share/classes/sun/security/provider/certpath/DistributionPointFetcher.java >

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Mark Powers
On Thu, 1 Sep 2022 22:10:54 GMT, Mark Powers wrote: >> Brad pointed me to this: >> https://www.oracle.com/technetwork/java/codeconventions-150003.pdf >> >> I think your reference is better since we're working on OpenJDK. > > Regarding your `return switch (res)...` comment: > You're suggesting to

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Mark Powers
On Thu, 1 Sep 2022 21:46:38 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/provider/certpath/BuildStep.java >> line 192: >> >>> 190: String resultString; >>> 191: switch (res) { >>> 192: case POSSIBLE: >> >> `case` should be indented here. See >> h

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Mark Powers
On Thu, 1 Sep 2022 02:55:21 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comments from Sean and Max > > src/java.base/share/classes/sun/security/provider/certpath/BasicChecker.java > line 105: >

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Mark Powers
On Thu, 1 Sep 2022 02:50:40 GMT, Weijun Wang wrote: >> I put the field back. > > There are altogether 3 places where this field was assigned. Make sure to add > back all of them. Got 'em all. - PR: https://git.openjdk.org/jdk/pull/9972

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Mark Powers
On Thu, 1 Sep 2022 14:09:42 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comments from Sean and Max > > src/java.base/share/classes/sun/security/util/DerInputStream.java line 292: > >> 290:

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Weijun Wang
On Thu, 1 Sep 2022 02:26:48 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > comments from Sean and Max More comments. `ssl` not read yet. src/java.base

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Mark Powers
On Thu, 1 Sep 2022 13:57:38 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> comments from Sean and Max > > src/java.base/share/classes/sun/security/util/AlgorithmDecomposer.java line > 110: > >> 1

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-09-01 Thread Weijun Wang
On Thu, 1 Sep 2022 02:26:48 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > comments from Sean and Max More comments. `x509` and `ssl` not reviewed yet.

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-08-31 Thread Weijun Wang
On Thu, 1 Sep 2022 02:26:48 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > comments from Sean and Max More comments. Haven't read `ssl`, `util`, and `x

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-08-31 Thread Weijun Wang
On Thu, 1 Sep 2022 02:26:48 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > comments from Sean and Max This includes all in `sun.security.provider.certp

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-08-31 Thread Weijun Wang
On Wed, 31 Aug 2022 04:22:15 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/pkcs12/MacData.java line 47: >> >>> 45: >>> 46: private String digestAlgorithmName; >>> 47: private AlgorithmParameters digestAlgorithmParams; >> >> Yes, this field is not used now. But one

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-31 Thread Weijun Wang
On Tue, 30 Aug 2022 22:53:31 GMT, Mark Powers wrote: >> http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html#toc-constants > > Can't argue with that. Normally we use `SHA2_GROUP`. There are underscores between the words. - PR: https://git.openjdk.org/jdk/pull/9972

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v4]

2022-08-31 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8291509 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: comments from Sean and Max - Changes: - all: https://git.openjdk.org/jdk/pull/9972/files - new: https://git.openjdk.org/jdk

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-31 Thread Mark Powers
On Wed, 31 Aug 2022 22:55:09 GMT, Mark Powers wrote: >> The tests that we have all pass. I think I'll intentionally break `equals` >> and see if the tests still pass. From my experience with PKCS#11, there is >> no reason to check that attribute arrays are equal. > > I broke `equals` to always

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-31 Thread Mark Powers
On Wed, 31 Aug 2022 22:43:58 GMT, Mark Powers wrote: >> In fact, I am not sure if this method works now. `PKCS10Attribute` has not >> overridden `equals`. Is this method ever used? I see it used in `PKCS10` but >> the encoding is used for comparison there. And, who would want to compare >> `PK

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-31 Thread Mark Powers
On Wed, 31 Aug 2022 22:30:57 GMT, Weijun Wang wrote: >> Ah, I see. The key for an attr might not be the id. > > In fact, I am not sure if this method works now. `PKCS10Attribute` has not > overridden `equals`. Is this method ever used? I see it used in `PKCS10` but > the encoding is used for co

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-31 Thread Weijun Wang
On Wed, 31 Aug 2022 22:25:57 GMT, Weijun Wang wrote: >> Don't know what you mean about changing `toString`. I could change `equals` >> to something like: >> >> >> public boolean equals(Object other) { >> if (!(other instanceof PKCS10Attributes)) >> return false; >> >>

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-31 Thread Weijun Wang
On Wed, 31 Aug 2022 22:29:59 GMT, Weijun Wang wrote: >> Sorry, I meant `equals`. Why cannot we just compare with `other.map`? > > Ah, I see. The key for an attr might not be the id. In fact, I am not sure if this method works now. `PKCS10Attribute` has not overridden `equals`. - P

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-31 Thread Weijun Wang
On Wed, 31 Aug 2022 22:23:42 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/pkcs10/PKCS10Attributes.java line >> 184: >> >>> 182: return false; >>> 183: PKCS10Attribute thisAttr, otherAttr; >>> 184: String key; >> >> This whole `toString` method

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-31 Thread Mark Powers
On Tue, 30 Aug 2022 20:23:26 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> white space > > src/java.base/share/classes/sun/security/pkcs10/PKCS10Attributes.java line > 184: > >> 182:

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-31 Thread Weijun Wang
On Wed, 31 Aug 2022 04:22:46 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/provider/PolicyParser.java line 576: >> >>> 574: } >>> 575: >>> 576: return (ignoreEntry == true) ? null : e; >> >> Remove definition of `ignoreEntry`. > > I don't see how that can

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-30 Thread Mark Powers
On Tue, 30 Aug 2022 20:12:19 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> white space > > src/java.base/share/classes/sun/security/pkcs/PKCS7.java line 216: > >> 214: >> 215: private void p

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-30 Thread Mark Powers
On Tue, 30 Aug 2022 21:38:26 GMT, Weijun Wang wrote: >> Why? > > http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html#toc-constants Can't argue with that. - PR: https://git.openjdk.org/jdk/pull/9972

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-30 Thread Weijun Wang
On Tue, 30 Aug 2022 21:25:25 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/jca/ProviderList.java line 672: >> >>> 670: "SHA3-384", "SHA3-512" }; >>> 671: private static final String[] HmacSHA3Group = { "HmacSHA3-224", >>> 672: "HmacSHA3-256", "Hm

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-30 Thread Mark Powers
On Tue, 30 Aug 2022 20:10:43 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> white space > > src/java.base/share/classes/sun/security/jca/ProviderList.java line 672: > >> 670: "SHA3-384

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-30 Thread Weijun Wang
On Mon, 29 Aug 2022 21:48:18 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > white space Files before (and equals to) `X509Factory`. src/java.base/shar

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-30 Thread Mark Powers
On Tue, 30 Aug 2022 19:52:03 GMT, Sean Mullan wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> white space > > src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java line 2319: > >> 2317:

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-30 Thread Mark Powers
On Tue, 30 Aug 2022 19:36:55 GMT, Sean Mullan wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> white space > > src/java.base/share/classes/sun/security/pkcs/SigningCertificateInfo.java > line 133: > >> 131: pri

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-30 Thread Mark Powers
On Tue, 30 Aug 2022 19:31:36 GMT, Sean Mullan wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> white space > > src/java.base/share/classes/sun/security/pkcs/PKCS7.java line 1003: > >> 1001: * @throws IOExceptio

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-30 Thread Sean Mullan
On Mon, 29 Aug 2022 21:48:18 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > white space A few more comments. src/java.base/share/classes/sun/security/

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-30 Thread Sean Mullan
On Mon, 29 Aug 2022 21:48:18 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > white space src/java.base/share/classes/sun/security/pkcs/PKCS7.java line 1

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v3]

2022-08-29 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8291509 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: white space - Changes: - all: https://git.openjdk.org/jdk/pull/9972/files - new: https://git.openjdk.org/jdk/pull/9972/file

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security [v2]

2022-08-29 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8291509 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: remove requireNonNull - Changes: - all: https://git.openjdk.org/jdk/pull/9972/files - new: https://git.openjdk.org/jdk/pull

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-26 Thread Mark Powers
On Fri, 26 Aug 2022 17:37:23 GMT, Mark Powers wrote: >> same here about dependent clause case. > > You are correct. Removing the comma. Maybe not. Each clause stands on its own as a complete sentence. - PR: https://git.openjdk.org/jdk/pull/9972

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-26 Thread Mark Powers
On Fri, 26 Aug 2022 17:46:44 GMT, Valerie Peng wrote: >> Right, but in this case I think if an NPE is ever thrown it would be >> considered a bug in the JDK because an unexpected RuntimeException would be >> thrown. I think requireNonNull is used more in cases where caller input is >> being va

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-26 Thread Valerie Peng
On Fri, 26 Aug 2022 10:39:20 GMT, Sean Mullan wrote: >> IntelliJ seems to think it could. The point of requireNonNull is that you >> control when an exception is thrown, and sooner rather than later is better. >> This code appears to have been working fine for a long time, so maybe NPE >> can'

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-26 Thread Mark Powers
On Fri, 26 Aug 2022 10:49:59 GMT, Sean Mullan wrote: >> I could go either way. The sentence is not that long (it's not a German >> sentence). IJ is only a recommendation. > > I'm not a grammar expert, but I think using a comma before and is not > necessary here and possibly incorrect. See > h

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-26 Thread Mark Powers
On Fri, 26 Aug 2022 10:50:54 GMT, Sean Mullan wrote: >> src/java.base/share/classes/sun/security/jca/Providers.java line 104: >> >>> 102: * Start JAR verification. This sets a special provider list for >>> 103: * the current thread. You MUST save the return value from this >>> 104:

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-26 Thread Mark Powers
On Fri, 26 Aug 2022 10:57:48 GMT, Sean Mullan wrote: >> If I make alternateNames final, then IJ complains "cannot assign a value to >> final variable". >> If I make it final and remove initialization, then make complains that >> alternateNames might not have been initialized. > > I would make

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-26 Thread Sean Mullan
On Thu, 25 Aug 2022 18:44:59 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/jca/ProviderList.java line 679: >> >>> 677: private final String algorithm; >>> 678: private final String provider; >>> 679: private String[] alternateNames = null; >> >> sho

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-26 Thread Sean Mullan
On Thu, 25 Aug 2022 18:45:10 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/jca/Providers.java line 212: >> >>> 210: >>> 211: // Change the thread local provider list. Use only if the current >>> thread >>> 212: // is already using a thread local list, and you want

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-26 Thread Sean Mullan
On Thu, 25 Aug 2022 15:07:27 GMT, Sean Mullan wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > src/java.base/share/classes/sun/security/jca/Providers.java line 104: > >> 102: * Start JAR verification. This sets a special provider list for >> 103: * the current thread. You MUST

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-26 Thread Sean Mullan
On Thu, 25 Aug 2022 18:44:54 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/jca/ProviderList.java line 129: >> >>> 127: int j = 0; >>> 128: for (ProviderConfig config : providerList.configs) { >>> 129: if >>> (!Objects.requireNonNull(config.getPr

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-25 Thread Mark Powers
On Thu, 25 Aug 2022 15:00:55 GMT, Sean Mullan wrote: >> https://bugs.openjdk.org/browse/JDK-8291509 > > src/java.base/share/classes/sun/security/jca/ProviderList.java line 129: > >> 127: int j = 0; >> 128: for (ProviderConfig config : providerList.configs) { >> 129: i

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-25 Thread Sean Mullan
On Mon, 22 Aug 2022 21:45:39 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-8291509 Some initial comments so far. src/java.base/share/classes/sun/security/jca/ProviderList.java line 129: > 127: int j = 0; > 128: for (ProviderConfig config : providerList.configs)

Re: RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-23 Thread Mark Powers
On Mon, 22 Aug 2022 21:45:39 GMT, Mark Powers wrote: > https://bugs.openjdk.org/browse/JDK-8291509 Mach5 tier1 and tier2 tests all pass on all platforms. - PR: https://git.openjdk.org/jdk/pull/9972

RFR: JDK-8291509 Minor cleanup could be done in sun.security

2022-08-22 Thread Mark Powers
https://bugs.openjdk.org/browse/JDK-8291509 - Commit messages: - Merge - fourth iteration - third iteration - mismerge - Merge - second iteration - first iteration Changes: https://git.openjdk.org/jdk/pull/9972/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9972&range