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

2024-02-01 Thread Roger Riggs
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

Re: RFR: 8324646: Avoid Class.forName in SecureRandom constructor [v2]

2024-01-24 Thread Roger Riggs
On Wed, 24 Jan 2024 17:57:38 GMT, Oli Gillespie wrote: >> src/java.base/share/classes/java/security/Provider.java line 1560: >> >>> 1558: final boolean supportsParameter; >>> 1559: final String constructorParameterClassName; >>> 1560: private volatile Class

Re: RFR: 8275338: Add JFR events for notable serialization situations [v14]

2024-01-12 Thread Roger Riggs
On Wed, 10 Jan 2024 18:56:45 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Small space optimization. Thanks for the updates.

Re: RFR: 8275338: Add JFR events for notable serialization situations [v4]

2024-01-10 Thread Roger Riggs
On Wed, 10 Jan 2024 17:41:41 GMT, Raffaello Giulietti wrote: >> The spec is silent about methods being 'native'; it would generally be >> impractical to implement native methods for these purposes, but a native >> method can implement the behavior. > > @RogerRiggs The checks are agnostic

Re: RFR: 8275338: Add JFR events for notable serialization situations [v4]

2024-01-10 Thread Roger Riggs
On Tue, 19 Dec 2023 15:58:10 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/io/SerializationMisdeclarationChecker.java >> line 185: >> >>> 183: commitEvent(PRIV_METH_NON_STATIC, >>> 184: m + " must be non-static to be effective"); >>> 185:

Re: RFR: 8275338: Add JFR events for notable serialization situations [v13]

2024-01-10 Thread Roger Riggs
On Wed, 10 Jan 2024 15:43:46 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Changes according to reviewers feedback.

Re: RFR: 8275338: Add JFR events for notable serialization situations [v12]

2024-01-10 Thread Roger Riggs
On Tue, 9 Jan 2024 10:41:31 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/io/SerializationMisdeclarationChecker.java >> line 53: >> >>> 51: private static final Class[] READ_OBJECT_NO_DATA_PARAM_TYPES = >>> {}; >>> 52: private static final Class[]

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

2024-01-10 Thread Roger Riggs
On Wed, 10 Jan 2024 14:58:37 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/math/BigInteger.java line 3998: >> >>> 3996: int i = ArraysSupport.mismatch(m1, m2, len1); >>> 3997: if (i != -1) >>> 3998: return Integer.compareUnsigned(m1[i], m2[i])

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

2024-01-10 Thread Roger Riggs
On Wed, 10 Jan 2024 11:27:53 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 bigger,

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

2024-01-09 Thread Roger Riggs
On Tue, 2 Jan 2024 14:37:27 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 bigger,

Re: RFR: 8275338: Add JFR events for notable serialization situations [v12]

2024-01-08 Thread Roger Riggs
On Mon, 8 Jan 2024 13:48:06 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti 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

Re: RFR: 8275338: Add JFR events for notable serialization situations [v10]

2023-12-21 Thread Roger Riggs
On Thu, 21 Dec 2023 09:53:10 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Corrected @Label of event and of field.

Re: RFR: 8275338: Add JFR events for notable serialization situations [v5]

2023-12-20 Thread Roger Riggs
On Wed, 20 Dec 2023 14:28:39 GMT, Roger Riggs wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Changes according to reviewer's comments. > > It would also be useful/interesting

Re: RFR: 8275338: Add JFR events for notable serialization situations [v5]

2023-12-20 Thread Roger Riggs
On Wed, 20 Dec 2023 15:01:02 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/io/SerializationMisdeclarationChecker.java >> line 113: >> >>> 111: if (longFromStatic(f) == null) { >>> 112: commitEvent(SUID_CONVERTIBLE_TO_LONG, >>> 113:

Re: RFR: 8275338: Add JFR events for notable serialization situations [v5]

2023-12-20 Thread Roger Riggs
On Tue, 19 Dec 2023 16:45:04 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Changes according to reviewer's comments. It would

Re: RFR: 8275338: Add JFR events for notable serialization situations [v5]

2023-12-20 Thread Roger Riggs
On Tue, 19 Dec 2023 16:45:04 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Changes according to reviewer's comments.

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-20 Thread Roger Riggs
On Wed, 20 Dec 2023 08:29:19 GMT, Daniel Fuchs wrote: >> You could define them with an Enum but use the ordinal as the value for JFR. > > Same remark here about finality as > https://github.com/openjdk/jdk/pull/17129#discussion_r1432400888. public > statics should be final. I'd also remove

Re: RFR: 8275338: Add JFR events for notable serialization situations [v4]

2023-12-19 Thread Roger Riggs
On Tue, 19 Dec 2023 12:21:05 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Better name for a label, corrected name of removed

Re: RFR: 8275338: Add JFR events for notable serialization situations [v3]

2023-12-19 Thread Roger Riggs
On Tue, 19 Dec 2023 17:41:57 GMT, Raffaello Giulietti wrote: >> Users (not OpenJDK developers) don't know what the error code means. I think >> it's better to not have them. This is how other events work. If you want to >> guard against changes, I would export the package to the test. > >

Re: RFR: 8315097: Rename createJavaProcessBuilder [v7]

2023-10-26 Thread Roger Riggs
On Wed, 25 Oct 2023 08:44:29 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to >> `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to >> `createTestJavaProcessBuilder`. Both are implemented through a private >> `createJavaProcessBuilder`. It

Re: RFR: 8315097: Rename createJavaProcessBuilder [v7]

2023-10-25 Thread Roger Riggs
On Wed, 25 Oct 2023 08:44:29 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to >> `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to >> `createTestJavaProcessBuilder`. Both are implemented through a private >> `createJavaProcessBuilder`. It

Re: RFR: 8315097: Rename createJavaProcessBuilder [v6]

2023-10-24 Thread Roger Riggs
On Tue, 24 Oct 2023 07:49:30 GMT, Leo Korinth wrote: >> This pull request renames `createJavaProcessBuilder` to >> `createLimitedTestJavaProcessBuilder` and renames `createTestJvm` to >> `createTestJavaProcessBuilder`. Both are implemented through a private >> `createJavaProcessBuilder`. It

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v5]

2023-10-18 Thread Roger Riggs
On Wed, 18 Oct 2023 16:39:47 GMT, Alan Bateman wrote: > We have to be very careful with proposals like this as it means code outside > of java.lang having access to the underlying bytes. I think other > alternatives needs to be explored to avoid this and related concerns. Yes, adding another

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v5]

2023-10-18 Thread Roger Riggs
On Tue, 17 Oct 2023 14:22:10 GMT, Shaojin Wen wrote: >> When calling String::newStringNoRepl and String::getBytesNoRepl, we need to >> use try...catch to handle CharacterCodingException and throw >> IllegalArgumentException instead of CharacterCodingException to make the >> calling code

Re: RFR: 8318200: String::newStringNoRepl and String::getBytesNoRepl does not throw CharacterCodingException [v5]

2023-10-17 Thread Roger Riggs
On Tue, 17 Oct 2023 14:22:10 GMT, Shaojin Wen wrote: >> When calling String::newStringNoRepl and String::getBytesNoRepl, we need to >> use try...catch to handle CharacterCodingException and throw >> IllegalArgumentException instead of CharacterCodingException to make the >> calling code

Re: RFR: 8315999: Improve Date toString performance [v13]

2023-09-13 Thread Roger Riggs
On Wed, 13 Sep 2023 14:22:35 GMT, 温绍锦 wrote: >> improve date toString performance, includes: >> >> java.util.Date.toString >> java.util.Date.toGMTString >> java.time.Instant.toString >> java.time.LocalDate.toString >> java.time.LocalDateTime.toString >> java.time.LocalTime.toString > > 温绍锦 has

Re: RFR: 8315999: Improve Date toString performance [v13]

2023-09-13 Thread Roger Riggs
On Wed, 13 Sep 2023 14:22:35 GMT, 温绍锦 wrote: >> improve date toString performance, includes: >> >> java.util.Date.toString >> java.util.Date.toGMTString >> java.time.Instant.toString >> java.time.LocalDate.toString >> java.time.LocalDateTime.toString >> java.time.LocalTime.toString > > 温绍锦 has

Re: RFR: 8315968: Move java.util.Digits to jdk.internal.util and refactor to reduce duplication [v19]

2023-09-12 Thread Roger Riggs
On Tue, 12 Sep 2023 13:27:29 GMT, 温绍锦 wrote: >> java.util.DecimalDigits::DIGITS and java.lang.StringLatin1.PACKED_DIGITS are >> duplicates, We need to move >> java.util.Digits/OctalDigits/DecimalDigits/HexDigits to the >> jdk.internal.util package, and modify these classes to public class, so

Re: RFR: 8315968: Move java.util.Digits to jdk.internal.util and refactor to reduce duplication [v19]

2023-09-12 Thread Roger Riggs
On Tue, 12 Sep 2023 14:13:06 GMT, 温绍锦 wrote: > The title has been updated, please help update the title of JIRA The description needs an update too. - PR Comment: https://git.openjdk.org/jdk/pull/15651#issuecomment-1715814638

Re: RFR: 8315999: Improve Date toString performance [v7]

2023-09-12 Thread Roger Riggs
On Tue, 12 Sep 2023 13:05:19 GMT, 温绍锦 wrote: >> improve date toString performance, includes: >> >> java.util.Date.toString >> java.util.Date.toGMTString >> java.time.Instant.toString >> java.time.LocalDate.toString >> java.time.LocalDateTime.toString >> java.time.LocalTime.toString > > 温绍锦 has

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v19]

2023-09-12 Thread Roger Riggs
On Tue, 12 Sep 2023 13:27:29 GMT, 温绍锦 wrote: >> Some codes in core libs are duplicated, including: >> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS >> java.util.DecimalDigits::size -> java.lang.Long.stringSize >> >> We can reduce duplication through JavaLangAccess,

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v7]

2023-09-11 Thread Roger Riggs
On Mon, 11 Sep 2023 16:36:55 GMT, 温绍锦 wrote: >> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 143: >> >>> 141: * code after loop unrolling. >>> 142: */ >>> 143: public static int stringSize(int x) { >> >> I suggest splitting the moves of `stringSize`

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v10]

2023-09-11 Thread Roger Riggs
On Mon, 11 Sep 2023 15:57:22 GMT, 温绍锦 wrote: >> Some codes in core libs are duplicated, including: >> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS >> java.util.DecimalDigits::size -> java.lang.Long.stringSize >> >> We can reduce duplication through JavaLangAccess,

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v2]

2023-09-10 Thread Roger Riggs
On Sun, 10 Sep 2023 17:59:10 GMT, 温绍锦 wrote: >> Some codes in core libs are duplicated, including: >> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS >> java.util.DecimalDigits::size -> java.lang.Long.stringSize >> >> We can reduce duplication through JavaLangAccess,

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS

2023-09-10 Thread Roger Riggs
On Sun, 10 Sep 2023 16:15:01 GMT, 温绍锦 wrote: > Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is

Re: RFR: 8315097: Rename createJavaProcessBuilder [v3]

2023-09-05 Thread Roger Riggs
On Mon, 4 Sep 2023 11:01:23 GMT, Leo Korinth wrote: > What do you prefer? Do you have a better alternative? Do someone still think > the current code is good? I think what we have today is inferior to all these > improvements, and I would like to make it harder to develop bad test ca The

Re: RFR: 8315097: Rename createJavaProcessBuilder [v3]

2023-08-30 Thread Roger Riggs
On Wed, 30 Aug 2023 09:23:55 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of >> createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed >> -i -e >>

Re: RFR: 8315097: Rename createJavaProcessBuilder [v2]

2023-08-29 Thread Roger Riggs
On Tue, 29 Aug 2023 14:06:01 GMT, Roger Riggs wrote: >> Leo Korinth has updated the pull request incrementally with one additional >> commit since the last revision: >> >> copyright > > I don't think this is the best change across so many files. > It gives

Re: RFR: 8315097: Rename createJavaProcessBuilder [v2]

2023-08-29 Thread Roger Riggs
On Tue, 29 Aug 2023 09:12:51 GMT, Leo Korinth wrote: >> Rename createJavaProcessBuilder so that it is not used by mistake instead of >> createTestJvm. >> >> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed >> -i -e >>

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

2023-08-08 Thread Roger Riggs
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 >> myself, should tread carefully; so

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

2023-07-14 Thread Roger Riggs
On Thu, 13 Jul 2023 22:57:49 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 carefully; so

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

2023-07-13 Thread Roger Riggs
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 >> myself, should tread carefully; so

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

2023-07-07 Thread Roger Riggs
On Thu, 6 Jul 2023 19:10:14 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 carefully; so

Re: RFR: 8281658: Add a security category to the java -XshowSettings option [v8]

2023-07-06 Thread Roger Riggs
On Tue, 27 Jun 2023 15:06:45 GMT, Sean Coffey wrote: >> New functionality in the -XshowSettings menu to display relevant information >> about JDK security configuration > > Sean Coffey has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev

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

2023-07-05 Thread Roger Riggs
On Wed, 5 Jul 2023 20:52:56 GMT, Pavel Rappo wrote: >> Are you sure? I just checked lines 91-92 and I'd say the change looks >> correct. > >> The original `<=` was correct, the number of bits in the input array must be >> less than the requested length of the BitArray. The constructors also

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

2023-07-05 Thread Roger Riggs
On Wed, 5 Jul 2023 14:52:22 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 carefully; so

Re: RFR: 8310901: Convert String::newStringNoRepl with Latin-1 to String::newStringLatin1NoRepl [v4]

2023-06-27 Thread Roger Riggs
On Tue, 27 Jun 2023 07:45:34 GMT, Glavo wrote: >> Added a new method `newStringLatin1NoRepl` to the `JavaLangAccess`. >> >> Reasons: >> >> * Most use cases of `newStringNoRepl` use `ISO_8859_1` as the charset, >> creating a new shortcut can make writing shorter; >> * Since all possible values

Re: RFR: 8310901: Convert String::newStringNoRepl with Latin-1 to String::newStringLatin1NoRepl [v4]

2023-06-27 Thread Roger Riggs
On Tue, 27 Jun 2023 07:45:34 GMT, Glavo wrote: >> Added a new method `newStringLatin1NoRepl` to the `JavaLangAccess`. >> >> Reasons: >> >> * Most use cases of `newStringNoRepl` use `ISO_8859_1` as the charset, >> creating a new shortcut can make writing shorter; >> * Since all possible values

Re: RFR: 8281658: Add a security category to the java -XshowSettings option [v5]

2023-06-19 Thread Roger Riggs
On Mon, 19 Jun 2023 16:11:12 GMT, Sean Coffey wrote: >> src/java.base/share/classes/sun/launcher/SecuritySettings.java line 66: >> >>> 64: ostream.println("Unrecognized security subcommand. See >>> \"java -X\" for help"); >>> 65: ostream.println("Printing all

Re: RFR: 8281658: Add a security category to the java -XshowSettings option [v5]

2023-06-16 Thread Roger Riggs
On Fri, 16 Jun 2023 12:14:49 GMT, Sean Coffey wrote: >> New functionality in the -XshowSettings menu to display relevant information >> about JDK security configuration > > Sean Coffey has updated the pull request incrementally with one additional > commit since the last revision: > > Pass

Re: RFR: 8281658: Add a security category to the java -XshowSettings option [v2]

2023-06-13 Thread Roger Riggs
On Tue, 13 Jun 2023 13:57:13 GMT, Sean Coffey wrote: >> New functionality in the -XshowSettings menu to display relevant information >> about JDK security configuration > > Sean Coffey has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev

Re: RFR: 8281658: Add a security category to the java -XshowSettings option

2023-06-09 Thread Roger Riggs
On Fri, 9 Jun 2023 13:54:14 GMT, Sean Coffey wrote: > New functionality in the -XshowSettings menu to display relevant information > about JDK security configuration src/java.base/share/classes/sun/launcher/LauncherHelper.java line 65: > 63: import java.text.MessageFormat; > 64: import

Re: RFR: 8308016: Use snippets in java.io package [v8]

2023-05-22 Thread Roger Riggs
On Thu, 18 May 2023 19:14:02 GMT, Brian Burkhalter wrote: >> Replace `{@code ...}` patterns and the like with `{@snippet >> lang=java : ...}`. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8308016: Address reviewer

Re: RFR: 8308016: Use snippets in java.io package [v7]

2023-05-18 Thread Roger Riggs
On Wed, 17 May 2023 20:51:29 GMT, Brian Burkhalter wrote: >> Replace `{@code ...}` patterns and the like with `{@snippet >> lang=java : ...}`. > > Brian Burkhalter has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated

Re: RFR: 8308016: Use snippets in java.io package [v2]

2023-05-17 Thread Roger Riggs
On Sun, 14 May 2023 05:50:20 GMT, Tagir F. Valeev wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8308016: Remove ellipses ("...") from snippets > > src/java.base/share/classes/java/io/RandomAccessFile.java

Integrated: 8304911: Use OperatingSystem enum in some modules

2023-04-10 Thread Roger Riggs
On Tue, 4 Apr 2023 19:22:48 GMT, Roger Riggs wrote: > With the addition of `jdk.internal.util.OperatingSystem` references to the > system property `os.name` can be replaced. > This PR exports jdk.internal.util to: > - java.prefs, > - java.security.jgss, >

Re: RFR: 8304911: Use OperatingSystem enum in some modules [v4]

2023-04-07 Thread Roger Riggs
> With the addition of `jdk.internal.util.OperatingSystem` references to the > system property `os.name` can be replaced. > This PR exports jdk.internal.util to: > - java.prefs, > - java.security.jgss, > - java.smartcardio, > - jdk.charsets, > - jdk.net, > -

Re: RFR: 8304911: Use OperatingSystem enum in some modules [v3]

2023-04-05 Thread Roger Riggs
> With the addition of `jdk.internal.util.OperatingSystem` references to the > system property `os.name` can be replaced. > This PR exports jdk.internal.util to: > - java.prefs, > - java.security.jgss, > - java.smartcardio, > - jdk.charsets, > - jdk.net, > -

Re: RFR: 8304911: Use OperatingSystem enum in some modules [v2]

2023-04-05 Thread Roger Riggs
> With the addition of `jdk.internal.util.OperatingSystem` references to the > system property `os.name` can be replaced. > This PR exports jdk.internal.util to: > - java.prefs, > - java.security.jgss, > - java.smartcardio, > - jdk.charsets, > - jdk.net, > -

Re: RFR: 8304911: Use OperatingSystem enum in some modules

2023-04-05 Thread Roger Riggs
On Wed, 5 Apr 2023 08:37:27 GMT, Alan Bateman wrote: >> With the addition of `jdk.internal.util.OperatingSystem` references to the >> system property `os.name` can be replaced. >> This PR exports jdk.internal.util to: >> - java.prefs, >> - java.security.jgss, >> - java.smartcardio, >> -

Re: RFR: 8304911: Use OperatingSystem enum in some modules

2023-04-05 Thread Roger Riggs
On Wed, 5 Apr 2023 08:39:35 GMT, Alan Bateman wrote: >> With the addition of `jdk.internal.util.OperatingSystem` references to the >> system property `os.name` can be replaced. >> This PR exports jdk.internal.util to: >> - java.prefs, >> - java.security.jgss, >> - java.smartcardio, >> -

RFR: 8304911: Use OperatingSystem enum in some modules

2023-04-04 Thread Roger Riggs
With the addition of `jdk.internal.util.OperatingSystem` references to the system property `os.name` can be replaced. This PR exports jdk.internal.util to: - java.prefs, - java.security.jgss, - java.smartcardio, - jdk.charsets, - jdk.net, - jdk.zipfs - Commit messages: - In

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

2023-03-06 Thread Roger Riggs
On Mon, 6 Mar 2023 20:22:48 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 observable effect on

Re: RFR: 8298873: Update IllegalRecordVersion.java for changes to TLS implementation [v4]

2023-01-26 Thread Roger Riggs
On Tue, 17 Jan 2023 17:12:05 GMT, Matthew Donovan wrote: >> - Updated ProtocolVersion.isNegotiable() to check a bounded range of version >> numbers. >> - Removed IllegalRecordVersion.java from ProblemList.txt >> >> Tested with jdk_security and jdk_security3 test groups. > > Matthew Donovan

Re: RFR: 8300647: Miscellaneous hashCode improvements in java.base [v2]

2023-01-19 Thread Roger Riggs
On Thu, 19 Jan 2023 13:46:26 GMT, Claes Redestad wrote: >> Went through the jdk and found a few more places where >> `ArraysSupport::vectorizedHashCode` can be used, and a few where adhoc >> methods could be replaced with a plain call to `java.util.Arrays` >> equivalents. This patch addresses

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2]

2023-01-16 Thread Roger Riggs
On Mon, 16 Jan 2023 15:06:25 GMT, Daniel Fuchs wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo found in code review. > > src/java.base/share/classes/java/lang/CharSequence.java line 76: > >> 74: * >>

Re: RFR: JDK-8298170 : Introduce a macro for exception check, free and return

2022-12-09 Thread Roger Riggs
On Fri, 9 Dec 2022 12:23:04 GMT, Matthias Baesken wrote: > Hi Roger , the new proposed version JNU_CHECK_EXCEPTION_DO is now almost as > lengthy as the original coding, Is it really worth it introducing a macro > when it gets so lengthy ? Its easier to understand the flow and cleanup being

Re: RFR: JDK-8298170 : Introduce a macro for exception check, free and return

2022-12-07 Thread Roger Riggs
On Tue, 6 Dec 2022 15:20:26 GMT, Matthias Baesken wrote: > We have a number of places in the codebase where a macro could help when we > check an exception and afterwrads free something and return. Good idea, though perhaps the return (and value if any) could be explicit in the macro

Re: RFR: JDK-8298170 : Introduce a macro for exception check, free and return

2022-12-06 Thread Roger Riggs
On Tue, 6 Dec 2022 15:20:26 GMT, Matthias Baesken wrote: > We have a number of places in the codebase where a macro could help when we > check an exception and afterwrads free something and return. The existing (and new) macro naming doesn't make clear that it always returns from the

Re: RFR: 8297519: Improve expressions and modernise code [v3]

2022-11-30 Thread Roger Riggs
On Wed, 30 Nov 2022 08:03:50 GMT, Per Minborg wrote: >> During the work of another PR (https://github.com/openjdk/jdk/pull/11260), >> several improvement areas were identified. These are now adressed in this >> separate PR proposing the use of more modern Java constructs as well as >>

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-29 Thread Roger Riggs
On Tue, 29 Nov 2022 16:46:43 GMT, Per Minborg wrote: > This PR proposes a variety of modernisations to the `jdk.sctp` module. > > During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several > improvement areas were identified including: > > * Replacing duplicate code segments > *

Re: RFR: 8297271: AccessFlags should be specific to class file version

2022-11-29 Thread Roger Riggs
On Mon, 28 Nov 2022 22:56:27 GMT, Roger Riggs wrote: > The accessFlags() methods added (in JDK 20, the current release) to > java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field > assume the access flags are from the current/most recent class file format

RFR: 8297271: AccessFlags should be specific to class file version

2022-11-28 Thread Roger Riggs
The accessFlags() methods added (in JDK 20, the current release) to java.lang.Class, java.lang.reflect.Executable, and java.lang.reflect.Field assume the access flags are from the current/most recent class file format version. For current and past class file format versions there are few

Re: RFR: 8297515: serialVersionUID fields are not annotated with @Serial

2022-11-28 Thread Roger Riggs
On Thu, 24 Nov 2022 08:19:17 GMT, Per Minborg wrote: > This PR proposes adding `@Serial` annotations to certain fields participating > in serialisation. LGTM - Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/11347

Re: RFR: 8297276: Remove thread text from Subject.current

2022-11-22 Thread Roger Riggs
On Tue, 22 Nov 2022 16:26:30 GMT, Weijun Wang wrote: > With the introduction of Virtual Threads, the current subject is no longer > guaranteed to be inherited in a new thread. Remove this requirement until we > find another way to implement `Subject::current`. LGTM, dropping the inaccurate

Re: RFR: 8290368: Introduce LDAP and RMI protocol-specific object factory filters to JNDI implementation [v5]

2022-10-14 Thread Roger Riggs
On Fri, 14 Oct 2022 17:27:34 GMT, Aleksei Efimov wrote: >> src/java.base/share/conf/security/java.security line 1388: >> >>> 1386: # are unused. >>> 1387: # >>> 1388: # Each class name pattern is matched against the factory class name >>> to allow or disallow its >> >> It appears that for

Re: RFR: 8290368: Introduce LDAP and RMI protocol-specific object factory filters to JNDI implementation [v3]

2022-10-13 Thread Roger Riggs
On Thu, 13 Oct 2022 12:34:47 GMT, Jaikiran Pai wrote: >> Aleksei Efimov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Change checkInput to be the global filter centric > > src/java.base/share/conf/security/java.security line 1408: >

Re: RFR: 8290368: Introduce LDAP and RMI protocol-specific object factory filters to JNDI implementation [v3]

2022-10-11 Thread Roger Riggs
On Mon, 10 Oct 2022 14:28:07 GMT, Aleksei Efimov wrote: >> ### Summary of the change >> This change introduces new system and security properties for specifying >> factory filters for the JNDI/LDAP and the JNDI/RMI JDK provider >> implementations. >> >> These new properties allow more

Re: RFR: 8290368: Introduce LDAP and RMI protocol-specific object factory filters to JNDI implementation

2022-10-06 Thread Roger Riggs
On Wed, 5 Oct 2022 15:23:43 GMT, Aleksei Efimov wrote: > ### Summary of the change > This change introduces new system and security properties for specifying > factory filters for the JNDI/LDAP and the JNDI/RMI JDK provider > implementations. > > These new properties allow more granular

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

2022-09-19 Thread Roger Riggs
On Mon, 19 Sep 2022 17:54:57 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8291974 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > added test As mentioned earlier in the comments... This is a completely

Re: RFR: 8288568: Reduce runtime of java.security microbenchmarks [v2]

2022-07-18 Thread Roger Riggs
On Fri, 17 Jun 2022 12:24:50 GMT, Claes Redestad wrote: >> - Reduce forks, iteration, runtime to reduce runtime while maintaining high >> data quality on typical benchmarking hosts. >> >> Reduces runtime from estimated 10+ hours to 54 minutes. > > Claes Redestad has updated the pull request

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[] [v4]

2022-07-13 Thread Roger Riggs
On Wed, 13 Jul 2022 15:11:25 GMT, Сергей Цыпанов wrote: >> We can skip bounds check and null check for Charset in case we use the array >> entirely and the Charset is either default one or proven to be non-null. >> >> Benchmark results: >> >> before >> >> Benchmark

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[]

2022-07-08 Thread Roger Riggs
On Fri, 8 Jul 2022 07:37:36 GMT, Сергей Цыпанов wrote: >> src/java.base/share/classes/java/lang/String.java line 1429: >> >>> 1427: */ >>> 1428: public String(byte[] bytes, int offset, int length) { >>> 1429: this(bytes, offset, length, Charset.defaultCharset(), >>>

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[]

2022-07-08 Thread Roger Riggs
On Thu, 7 Jul 2022 10:21:06 GMT, Сергей Цыпанов wrote: > We can skip bounds check and null check for Charset in case we use the array > entirely and the Charset is either default one or proven to be non-null. > > Benchmark results: > > before > > Benchmark

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v11]

2022-07-01 Thread Roger Riggs
On Fri, 1 Jul 2022 08:31:28 GMT, Xue-Lei Andrew Fan wrote: > Could someone in Oracle help me run Mach 5 testing? The CI Passed for Tiers 1-3. - PR: https://git.openjdk.org/jdk/pull/8979

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-07-01 Thread Roger Riggs
On Fri, 1 Jul 2022 08:40:06 GMT, Daniel Fuchs wrote: >> @dfuch Taking a reference as parameter could simplify the use of ForceGC. >> I though about this idea as well, when I had to check lambada expressions in >> each call. I would like to do it in the future so that this PR could focus >>

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-06-30 Thread Roger Riggs
On Thu, 30 Jun 2022 18:39:48 GMT, Xue-Lei Andrew Fan wrote: >> test/lib/jdk/test/lib/util/ForceGC.java line 58: >> >>> 56: Reference.reachabilityFence(ref); >>> 57: >>> 58: for (int retries = (int)(timeout / 200); retries >= 0; >>> retries--) { >> >> The logic around the

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v11]

2022-06-30 Thread Roger Riggs
On Thu, 30 Jun 2022 18:44:30 GMT, Xue-Lei Andrew Fan wrote: >> This is a follow up update per comments in [JDK-8287384 >> PR](https://github.com/openjdk/jdk/pull/8907). The tier1 and tier2 test in >> open part looks good to me. Please help to run Mach5 just case the closed >> test cases are

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-06-30 Thread Roger Riggs
On Thu, 30 Jun 2022 18:24:14 GMT, Xue-Lei Andrew Fan wrote: >> test/lib/jdk/test/lib/util/ForceGC.java line 70: >> >>> 68: // But it is fine. For most cases, the 1st GC is >>> sufficient >>> 69: // to trigger and complete the cleanup. >>> 70:

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v10]

2022-06-30 Thread Roger Riggs
On Sat, 18 Jun 2022 05:55:32 GMT, Xue-Lei Andrew Fan wrote: >> This is a follow up update per comments in [JDK-8287384 >> PR](https://github.com/openjdk/jdk/pull/8907). The tier1 and tier2 test in >> open part looks good to me. Please help to run Mach5 just case the closed >> test cases are

Re: RFR: 8287596: Reorg jdk.test.lib.util.ForceGC [v9]

2022-06-16 Thread Roger Riggs
On Thu, 16 Jun 2022 15:55:00 GMT, Xue-Lei Andrew Fan wrote: >> This is a follow up update per comments in [JDK-8287384 >>