Re: RFR: JDK-8328501 Incorrect @since` tags for java security interfaces [v3]

2024-04-09 Thread Pavel Rappo
On Mon, 25 Mar 2024 22:51:48 GMT, Nizar Benalla wrote: >> For context, I am writing tests to check for accurate use of `@since` tags >> in documentation comments in source code. >> We're following these rules for now: >> >> ### Rule 1: Introduction of New Elements >> >> - If an element is new

Re: RFR: 8330178: Clean up non-standard use of /** comments in `java.base`

2024-04-19 Thread Pavel Rappo
On Thu, 18 Apr 2024 20:44:00 GMT, Jonathan Gibbons wrote: > Please review a set of updates to clean up use of `/**` comments in the > vicinity of declarations. > > There are various categories of update: > > * "Box comments" beginning with `/**` > * Misplaced doc comments before package or imp

Re: RFR: 8330954: Fix remaining `@since` tags in `java.base`

2024-05-05 Thread Pavel Rappo
On Sat, 27 Apr 2024 10:33:42 GMT, Nizar Benalla wrote: > Also have you looked at the output documentation? Without the `@inheritDoc` > tags the content will only have a since tag, which is definitely wrong. This is not how I remember it. Unless written around, `{@inheritDoc}` in a main descrip

Re: RFR: 8330954: Fix remaining `@since` tags in `java.base`

2024-05-05 Thread Pavel Rappo
On Mon, 29 Apr 2024 22:54:47 GMT, Chen Liang wrote: > would be nice if you can share more about these (also about the behaviors of > inheriting `@throws` etc. I hope this document explains it well; if it doesn't, we should fix it: https://docs.oracle.com/en/java/javase/22/docs/specs/javadoc/do

Re: RFR: 8330954: Fix remaining `@since` tags in `java.base`

2024-05-05 Thread Pavel Rappo
On Thu, 25 Apr 2024 14:29:27 GMT, Nizar Benalla wrote: > Please review this PR that aims to add all the remaining needed `@since` tags > in `java.base`, and group them into a single fix. > This is related to #18934 and my work around the `@since` checker feature. > Explicit `@since` tags are nee

Re: RFR: 8330954: Fix remaining `@since` tags in `java.base`

2024-05-05 Thread Pavel Rappo
On Mon, 29 Apr 2024 17:46:24 GMT, Nizar Benalla wrote: > Pavel, can I simply change the PR/issue title to be more descriptive? As I > want to include the the inherit doc because of the unchecked exceptions, > rather than clean this up in a different PR I suggest dropping all the changes that a

RFR: 8330205: Initial troff manpage generation for JDK 24

2024-05-07 Thread Pavel Rappo
Please review this mechanical change to man pages. This PR should be integrated after https://github.com/openjdk/jdk/pull/18787. - Commit messages: - Initial commit Changes: https://git.openjdk.org/jdk/pull/19119/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19119&range=

Re: RFR: 8330205: Initial troff manpage generation for JDK 24

2024-05-07 Thread Pavel Rappo
On Tue, 7 May 2024 11:53:19 GMT, Pavel Rappo wrote: > Please review this mechanical change to man pages. This PR should be > integrated after https://github.com/openjdk/jdk/pull/18787. This PR is standalone as opposed to dependent because the https://github.com/openjdk/jdk/pull

Re: RFR: 8330205: Initial troff manpage generation for JDK 24

2024-05-07 Thread Pavel Rappo
On Tue, 7 May 2024 11:53:19 GMT, Pavel Rappo wrote: > Please review this mechanical change to man pages. This PR should be > integrated after https://github.com/openjdk/jdk/pull/18787. Thanks for reviewing it Joe, I'm now delegating integration of this PR to @JesperIRL, you, or

Re: RFR: 8330205: Initial troff manpage generation for JDK 24

2024-05-13 Thread Pavel Rappo
On Thu, 9 May 2024 08:18:41 GMT, David Holmes wrote: >> Please review this mechanical change to man pages. This PR should be >> integrated after https://github.com/openjdk/jdk/pull/18787. > > src/java.base/share/man/java.1 line 3856: > >> 3854: .SH REMOVED JAVA OPTIONS >> 3855: .PP >> 3856: The

Withdrawn: 8330205: Initial troff manpage generation for JDK 24

2024-05-14 Thread Pavel Rappo
On Tue, 7 May 2024 11:53:19 GMT, Pavel Rappo wrote: > Please review this mechanical change to man pages. This PR should be > integrated after https://github.com/openjdk/jdk/pull/18787. This pull request has been closed without being integrated. - PR: https://git.openjdk.o

Re: RFR: 8330205: Initial troff manpage generation for JDK 24

2024-05-14 Thread Pavel Rappo
On Tue, 7 May 2024 11:53:19 GMT, Pavel Rappo wrote: > Please review this mechanical change to man pages. This PR should be > integrated after https://github.com/openjdk/jdk/pull/18787. Withdrawing this, as a different approach is required. - PR Comment: https://git.openj

RFR: 8332826: Make hashCode methods in ArraysSupport friendlier

2024-05-27 Thread Pavel Rappo
Please review this PR, which supersedes a now withdrawn https://github.com/openjdk/jdk/pull/14831. This PR replaces `ArraysSupport.vectorizedHashCode` with a set of more user-friendly methods. Here's a summary: - Made the operand constants (i.e. `T_BOOLEAN` and friends) and the `vectorizedHash

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-27 Thread Pavel Rappo
t side, since the method > is now private, it's no longer callable by clients of `ArraysSupport`, thus a > problem of an inaccurate name is less severe. > > - Made the `ArraysSupport.utf16HashCode` method private > > - Moved tiny cases (i.e. 0, 1, 2) to `ArraysSupport` Pavel Ra

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-28 Thread Pavel Rappo
On Tue, 28 May 2024 20:38:21 GMT, Claes Redestad wrote: >> src/java.base/share/classes/jdk/internal/util/ArraysSupport.java line 301: >> >>> 299: return switch (length) { >>> 300: case 0 -> initialValue; >>> 301: case 1 -> 31 * initialValue + JLA.getUTF16Char(a,

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-28 Thread Pavel Rappo
On Tue, 28 May 2024 22:08:06 GMT, Pavel Rappo wrote: >> Yes, should be `2` (`a` is semantically a `char[]`). This typo likely pass >> functional testing since `1` can never happen in practice, and the default >> case should work for any value. There might be a String

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-29 Thread Pavel Rappo
On Tue, 28 May 2024 20:21:34 GMT, Claes Redestad wrote: >> test/hotspot/jtreg/compiler/intrinsics/TestArraysHashCode.java line 88: >> >>> 86: private static int testIntrinsic(byte[] bytes, int type) >>> 87: throws InvocationTargetException, IllegalAccessException { >>> 88:

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-29 Thread Pavel Rappo
On Wed, 29 May 2024 03:21:27 GMT, Chen Liang wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix incorrect utf16 hashCode adaptation > > src/java.base/share/classes/jdk/internal/ut

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-29 Thread Pavel Rappo
On Tue, 28 May 2024 20:40:30 GMT, Claes Redestad wrote: >> src/java.base/share/classes/jdk/internal/util/ArraysSupport.java line 275: >> >>> 273: return switch (length) { >>> 274: case 0 -> initialValue; >>> 275: case 1 -> 31 * initialValue + (a[fromIndex] & 0xff)

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-29 Thread Pavel Rappo
On Tue, 28 May 2024 19:13:50 GMT, Jorn Vernee wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix incorrect utf16 hashCode adaptation > > src/java.base/share/classes/jdk/internal/ut

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v3]

2024-05-29 Thread Pavel Rappo
t side, since the method > is now private, it's no longer callable by clients of `ArraysSupport`, thus a > problem of an inaccurate name is less severe. > > - Made the `ArraysSupport.utf16HashCode` method private > > - Moved tiny cases (i.e. 0, 1, 2) to `ArraysSupport` Pa

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-29 Thread Pavel Rappo
On Wed, 29 May 2024 12:44:45 GMT, Pavel Rappo wrote: >> I don't care as long as microbenchmarks don't get a hiccup. > > @cl4es, here are some results from my machine (macosx-aarch64): > > Name (size) Cnt BaseError Te

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-29 Thread Pavel Rappo
On Wed, 29 May 2024 12:53:42 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/jdk/internal/util/ArraysSupport.java line 252: >> >>> 250: return switch (length) { >>> 251: case 0 -> initialValue; >>> 252: case

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-29 Thread Pavel Rappo
On Wed, 29 May 2024 15:50:05 GMT, Pavel Rappo wrote: >> @cl4es, here are some results from my machine (macosx-aarch64): >> >> Name (size) Cnt BaseError TestError >> Unit Change >> ArraysHashCode.bytes1

Re: RFR: 8332826: Make hashCode methods in ArraysSupport friendlier [v2]

2024-05-30 Thread Pavel Rappo
On Thu, 30 May 2024 08:34:59 GMT, Claes Redestad wrote: >> @cl4es, do you want me to delete that test file altogether? > > I thought you verified that the non-constant type test still provoke a crash > (on x86) if you back out the code changes in > https://github.com/openjdk/jdk/commit/969f6a37

Integrated: 8332826: Make hashCode methods in ArraysSupport friendlier

2024-05-30 Thread Pavel Rappo
On Mon, 27 May 2024 16:28:31 GMT, Pavel Rappo wrote: > Please review this PR, which supersedes a now withdrawn > https://github.com/openjdk/jdk/pull/14831. > > This PR replaces `ArraysSupport.vectorizedHashCode` with a set of more > user-friendly methods. Here's a summ

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v2]

2024-08-20 Thread Pavel Rappo
On Wed, 13 Sep 2023 17:38:28 GMT, Justin Lu wrote: >> JDK .properties files still use ISO-8859-1 encoding with escape sequences. >> It would improve readability to see the native characters instead of escape >> sequences (especially for the L10n process). The majority of files changed >> are l

RFR: 8303480: Miscellaneous fixes to mostly invisible doc comments

2023-03-02 Thread Pavel Rappo
Please review this superficial documentation cleanup that was triggered by unrelated analysis of doc comments in JDK API. The only effect that this multi-area PR has on the JDK API Documentation (i.e. the observable effect on the generated HTML pages) can be summarized as follows: diff -ur

Re: RFR: 8303480: Miscellaneous fixes to mostly invisible doc comments

2023-03-03 Thread Pavel Rappo
On Thu, 2 Mar 2023 16:23:17 GMT, Alexey Ivanov wrote: >> Please review this superficial documentation cleanup that was triggered by >> unrelated analysis of doc comments in JDK API. >> >> The only effect that this multi-area PR has on the JDK API Documentation >> (i.e. the observable effect on

Re: RFR: 8303480: Miscellaneous fixes to mostly invisible doc comments

2023-03-03 Thread Pavel Rappo
On Fri, 3 Mar 2023 08:15:49 GMT, Alexey Ivanov wrote: >> Please review this superficial documentation cleanup that was triggered by >> unrelated analysis of doc comments in JDK API. >> >> The only effect that this multi-area PR has on the JDK API Documentation >> (i.e. the observable effect on

Re: RFR: 8303480: Miscellaneous fixes to mostly invisible doc comments [v2]

2023-03-06 Thread Pavel Rappo
seem to occur in infrequently updated third-party code (e.g. > javax.xml), which I assume we shouldn't touch unless necessary. > * I will update copyright years after (and if) the fix had been approved, as > required. Pavel Rappo has updated the pull request with a new target bas

Integrated: 8303480: Miscellaneous fixes to mostly invisible doc comments

2023-03-07 Thread Pavel Rappo
On Thu, 2 Mar 2023 12:03:44 GMT, Pavel Rappo wrote: > Please review this superficial documentation cleanup that was triggered by > unrelated analysis of doc comments in JDK API. > > The only effect that this multi-area PR has on the JDK API Documentation > (i.e. the observabl

RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Pavel Rappo
Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. - Commit messages: - Fix copyright years - Initial commit Changes: https://git.openjdk.org/jdk/pull/14718/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14718&range=00 Issue: https://bugs.openj

Re: RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Pavel Rappo
On Thu, 29 Jun 2023 21:28:39 GMT, Joe Darcy wrote: > Looks fine, but please give some time for others reviewers before pushing. Absolutely! Also, this PR contains a code change (a typo in an error message), which, technically speaking, disqualifies the bug from being "noreg-doc" and requires

Re: RFR: 8311122: Fix typos in java.base

2023-06-29 Thread Pavel Rappo
On Thu, 29 Jun 2023 21:17:49 GMT, Pavel Rappo wrote: > Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. Our CI tests are fine with this change. That said, I'll wait for security-dev to complete the review, and then wait for a few more days so that othe

RFR: 8311170: Simplify and modernize equals and hashCode in security area

2023-06-30 Thread Pavel Rappo
Please review this PR to use modern APIs and language features to simplify `equals` and `hashCode` in security area. I understand that security area is sensitive and a non-expert, such as myself, should tread carefully; so below are my notes to assist the review. * Unlike `hashCode`, non-secure

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v2]

2023-06-30 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return f

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v3]

2023-07-04 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return f

Re: RFR: 8311122: Fix typos in java.base

2023-07-04 Thread Pavel Rappo
On Thu, 29 Jun 2023 21:17:49 GMT, Pavel Rappo wrote: > Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. Alright, I think all the areas that this PR touches have been reviewed by area experts. - PR Comment: https://git.openjdk.org/jdk/pull/14

Integrated: 8311122: Fix typos in java.base

2023-07-04 Thread Pavel Rappo
On Thu, 29 Jun 2023 21:17:49 GMT, Pavel Rappo wrote: > Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. This pull request has now been integrated. Changeset: 7b3c2dc5 Author: Pavel Rappo URL: https://git.openjdk.org/jdk/com

[jdk21] RFR: 8311122: Fix typos in java.base

2023-07-04 Thread Pavel Rappo
Hi all, This pull request contains a backport of commit [7b3c2dc5](https://github.com/openjdk/jdk/commit/7b3c2dc5f45afc3646ff5cdc0f6efd68e0b70ea5) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Pavel Rappo on 4 Jul 2023 and was

Re: [jdk21] RFR: 8311122: Fix typos in java.base

2023-07-04 Thread Pavel Rappo
On Tue, 4 Jul 2023 19:05:58 GMT, Pavel Rappo wrote: > Hi all, > > This pull request contains a backport of commit > [7b3c2dc5](https://github.com/openjdk/jdk/commit/7b3c2dc5f45afc3646ff5cdc0f6efd68e0b70ea5) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v3]

2023-07-05 Thread Pavel Rappo
On Wed, 5 Jul 2023 12:31:09 GMT, Daniel Jeliński wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add even more cases and tidy up > > src/java.base/share/classes/java/security

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v3]

2023-07-05 Thread Pavel Rappo
On Wed, 5 Jul 2023 14:39:44 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/security/spec/ECFieldF2m.java line 235: >> >>> 233: public int hashCode() { >>> 234: int value = m << 5; >>> 235: // consider simplifying usin

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v4]

2023-07-05 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return false; &

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v3]

2023-07-05 Thread Pavel Rappo
On Wed, 5 Jul 2023 12:16:32 GMT, Daniel Jeliński wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add even more cases and tidy up > > src/java.base/share/classes/sun/security/provid

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v4]

2023-07-05 Thread Pavel Rappo
On Wed, 5 Jul 2023 18:04:01 GMT, Roger Riggs wrote: >> Pavel Rappo 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 six addi

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v4]

2023-07-05 Thread Pavel Rappo
On Wed, 5 Jul 2023 19:35:23 GMT, Daniel Jeliński wrote: >> src/java.base/share/classes/sun/security/util/BitArray.java line 72: >> >>> 70: * specified byte array. The most significant bit of {@code a[0]} >>> gets >>> 71: * index zero in the BitArray. The array must be large enough to

[jdk21] Integrated: 8311122: Fix typos in java.base

2023-07-06 Thread Pavel Rappo
On Tue, 4 Jul 2023 19:05:58 GMT, Pavel Rappo wrote: > Hi all, > > This pull request contains a backport of commit > [7b3c2dc5](https://github.com/openjdk/jdk/commit/7b3c2dc5f45afc3646ff5cdc0f6efd68e0b70ea5) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v4]

2023-07-06 Thread Pavel Rappo
On Thu, 6 Jul 2023 16:25:05 GMT, Sean Mullan wrote: >> Pavel Rappo 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 six addi

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v4]

2023-07-06 Thread Pavel Rappo
On Thu, 6 Jul 2023 17:06:31 GMT, Sean Mullan wrote: >> src/java.base/share/classes/sun/security/x509/X500Name.java line 422: >> >>> 420: // quick check that number of RDNs and AVAs match before >>> canonicalizing >>> 421: if (!Arrays.equals(this.names, other.names, >>> 422:

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v5]

2023-07-06 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return f

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v6]

2023-07-06 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return f

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v6]

2023-07-07 Thread Pavel Rappo
On Fri, 7 Jul 2023 19:19:03 GMT, Sean Mullan wrote: > Took another pass at this, looks good, but I would like to take another last > look and make sure that changing the hash code for some of the classes like > X509CRL is a benign change. Thanks, Sean. Take your time, you're an expert in this

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v7]

2023-07-07 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return false; &

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v6]

2023-07-11 Thread Pavel Rappo
On Fri, 7 Jul 2023 19:21:29 GMT, Pavel Rappo wrote: > > Took another pass at this, looks good, but I would like to take another > > last look and make sure that changing the hash code for some of the classes > > like X509CRL is a benign change. > > Thanks, Sean. T

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v7]

2023-07-11 Thread Pavel Rappo
On Fri, 7 Jul 2023 23:19:27 GMT, Pavel Rappo wrote: >> Please review this PR to use modern APIs and language features to simplify >> `equals` and `hashCode` in security area. >> >> I understand that security area is sensitive and a non-expert, such as >> myse

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v8]

2023-07-13 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return false; &

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v7]

2023-07-13 Thread Pavel Rappo
On Fri, 7 Jul 2023 23:19:27 GMT, Pavel Rappo wrote: >> Please review this PR to use modern APIs and language features to simplify >> `equals` and `hashCode` in security area. >> >> I understand that security area is sensitive and a non-expert, such as >> myse

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v9]

2023-07-13 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return fa

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v8]

2023-07-13 Thread Pavel Rappo
On Thu, 13 Jul 2023 08:51:23 GMT, Pavel Rappo wrote: >> Please review this PR to use modern APIs and language features to simplify >> `equals` and `hashCode` in security area. >> >> I understand that security area is sensitive and a non-expert, such as >> myse

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v9]

2023-07-17 Thread Pavel Rappo
On Mon, 17 Jul 2023 10:15:18 GMT, Daniel Jeliński wrote: >> Pavel Rappo has updated the pull request incrementally with five additional >> commits since the last revision: >> >> - Feedback: avoid intermediate assignments >> - More previously missed cases

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v9]

2023-07-17 Thread Pavel Rappo
On Mon, 17 Jul 2023 11:02:46 GMT, Daniel Jeliński wrote: >> You think it was a typo (+ instead of *) in the original code? > > The original code calculated `(37 ** > nameValue.length)*(37+oid.hashCode)+Arrays.hashCode`; since you already > dropped the multiplication, you can also drop the addit

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v9]

2023-07-17 Thread Pavel Rappo
On Mon, 17 Jul 2023 12:23:17 GMT, Pavel Rappo wrote: >> The original code calculated `(37 ** >> nameValue.length)*(37+oid.hashCode)+Arrays.hashCode`; since you already >> dropped the multiplication, you can also drop the addition. > > Thanks for noticing this differenc

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v10]

2023-07-17 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return f

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v9]

2023-07-17 Thread Pavel Rappo
On Mon, 17 Jul 2023 18:39:37 GMT, Daniel Jeliński wrote: > I think `oid.hashCode() + Arrays.hashCode(nameValue)` would have been good > enough, but deepHashCode is also acceptable. Fixed as you suggested, in 3139043370f. - PR Review Comment: https://git.openjdk.org/jdk/pull/14738#

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v11]

2023-07-28 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return false; &

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]

2023-08-01 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return f

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]

2023-08-04 Thread Pavel Rappo
On Thu, 3 Aug 2023 22:49:46 GMT, Valerie Peng wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Feedback > > src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyIm

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]

2023-08-04 Thread Pavel Rappo
On Fri, 4 Aug 2023 09:35:54 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/com/sun/crypto/provider/PBKDF2KeyImpl.java line >> 272: >> >>> 270: } >>> 271: >>> 272: if >>> (!(that.getAlgorithm().equalsIgnor

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]

2023-08-04 Thread Pavel Rappo
On Thu, 3 Aug 2023 21:43:44 GMT, Valerie Peng wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Feedback > > src/java.base/share/classes/sun/security/x509/PolicyInformation.java line

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]

2023-08-04 Thread Pavel Rappo
On Fri, 4 Aug 2023 00:04:03 GMT, Valerie Peng wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Feedback > > src/java.base/share/classes/sun/security/provider/certpath/Cert

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]

2023-08-04 Thread Pavel Rappo
On Fri, 4 Aug 2023 19:45:34 GMT, Sean Mullan wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Feedback > > src/java.base/share/classes/com/sun/crypto/provider/DESKey.java line 113: >

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]

2023-08-04 Thread Pavel Rappo
On Fri, 4 Aug 2023 19:54:58 GMT, Sean Mullan wrote: > I would add to that list that I think it is really important any change to > the `hashCode` impl doesn't break the equals/hashCode contract, so it's > important to look at the `equals` implementation in conjunction with any > changes to `ha

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]

2023-08-04 Thread Pavel Rappo
On Fri, 4 Aug 2023 21:40:37 GMT, Valerie Peng wrote: > Why changing the ordering? The order was changed to be parallel with that of `equals`. > I was wondering if you'd change this to Objects.hash(...) with all the fields > as arguments. Sure, we could use a convenience method, but because `e

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]

2023-08-08 Thread Pavel Rappo
On Fri, 4 Aug 2023 21:30:00 GMT, Valerie Peng wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Feedback > > src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddre

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v13]

2023-08-08 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return false; &

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]

2023-08-08 Thread Pavel Rappo
On Tue, 8 Aug 2023 11:54:42 GMT, Pavel Rappo wrote: >> src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddress.java >> line 105: >> >>> 103: return false; >>> 104: if (address != null && h.address != null)

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v14]

2023-08-08 Thread Pavel Rappo
> // check certs > if (this.certs == null && that.certs != null || > this.certs != null && that.certs == null || > this.certs != null && > this.certs.length != that.certs.length) { > return f

Re: RFR: 8311170: Simplify and modernize equals and hashCode in security area [v14]

2023-08-09 Thread Pavel Rappo
On Tue, 8 Aug 2023 16:17:44 GMT, Pavel Rappo wrote: >> Please review this PR to use modern APIs and language features to simplify >> `equals` and `hashCode` in security area. >> >> I understand that security area is sensitive and a non-expert, such as >> myse

Integrated: 8311170: Simplify and modernize equals and hashCode in security area

2023-08-09 Thread Pavel Rappo
On Fri, 30 Jun 2023 16:16:38 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > `equals` and `hashCode` in security area. > > I understand that security area is sensitive and a non-expert, such as > myself, should tread care

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v8]

2023-11-10 Thread Pavel Rappo
On Tue, 7 Nov 2023 07:58:40 GMT, Pavel Rappo wrote: >> Please review this PR to use modern APIs and language features to simplify >> equals, hashCode, and compareTo for BigInteger. If you have any performance >> concerns, please raise them. >> >> This PR is ch

Re: RFR: 8322065: Initial nroff manpage generation for JDK 23

2023-12-14 Thread Pavel Rappo
On Thu, 14 Dec 2023 05:46:01 GMT, David Holmes wrote: > Updated the version to 23-ea and year to 2024. > > This initial generation also picks up the unpublished changes from: > > - [JDK-8302233](https://bugs.openjdk.org/browse/JDK-8302233) (keytool & > jarsigner) > - [JDK-8290702](https://bugs

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v8]

2023-12-14 Thread Pavel Rappo
On Tue, 7 Nov 2023 07:58:40 GMT, Pavel Rappo wrote: >> Please review this PR to use modern APIs and language features to simplify >> equals, hashCode, and compareTo for BigInteger. If you have any performance >> concerns, please raise them. >> >> This PR is ch

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v9]

2023-12-14 Thread Pavel Rappo
hat latter PR will be published soon. Pavel Rappo 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 16 additional commits since the last revision: - Me

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v10]

2024-01-02 Thread Pavel Rappo
hat latter PR will be published soon. Pavel Rappo 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 17 additional commits since the last revision: - Me

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v11]

2024-01-10 Thread Pavel Rappo
hat latter PR will be published soon. Pavel Rappo has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits: - Use Integer.compareUnsigned - Update copyright years and headers - Merge branch 'master' into 8310813 - Merge

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v12]

2024-01-11 Thread Pavel Rappo
hat latter PR will be published soon. Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision: Revert copyright year change Those files were first published in 2023 and haven't been changed since. - Changes: - all: http

Integrated: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger

2024-01-11 Thread Pavel Rappo
On Fri, 23 Jun 2023 17:27:00 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > equals, hashCode, and compareTo for BigInteger. If you have any performance > concerns, please raise them. > > This PR is cherry-picked from a

Re: RFR: 8325109: Sort method modifiers in canonical order

2024-02-01 Thread Pavel Rappo
On Thu, 1 Feb 2024 11:57:04 GMT, Magnus Ihse Bursie wrote: > This is a follow-up on > [JDK-8324053](https://bugs.openjdk.org/browse/JDK-8324053). I have run the > bin/blessed-modifier-order.sh on the entire code base, and manually checked > the result. I have reverted all but these trivial and