Re: RFR: 8301737: java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java fail with -Xcomp [v3]

2023-02-07 Thread Roger Riggs
On Tue, 7 Feb 2023 08:27:57 GMT, SUN Guoyun wrote: >> Hi all, >> When -Xcomp be used, this testcase will use more codecaches, causing the GC >> to be triggered early, then causing this test failed on LoongArch64 >> architecture. >> >> This PR fix the issue, Please help review it. >> >>

Re: [jdk20] RFR: 8301863: ObjectInputFilter example incorrectly calls rejectUndecidedClass [v2]

2023-02-06 Thread Roger Riggs
If a stream specific > filter is set and does not accept or reject a class, the combined filter is > applied. > > This is a doc-only change. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: 8301863: ObjectInputFilter e

[jdk20] RFR: 8301864: ObjectInputFilter example incorrectly calls rejectUndecideClass

2023-02-06 Thread Roger Riggs
The example code in ObjectInputFilter for the FilterInThread filter factory does not do what is intended and is poorly described. Clarifies that the JVM-wide filter and the thread local filter are merged and will reject classes that are otherwise not accepted or rejected. If a stream specific

Re: java.util.Date.parse(String) doesn't declare thrown IllegalArgumentException

2023-02-06 Thread Roger Riggs
Hi Andrey, Instead, perhaps replace (carefully) the remaining uses in the JDK. Developers should be using the correct APIs and not reading deprecated javadoc. Regards, Roger On 2/6/23 11:41 AM, Andrey Turbanov wrote: Hello. I've noticed that method 'long java.util.Date.parse(String)'

Re: RFR: 8301737: java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java fail with -Xcomp [v2]

2023-02-06 Thread Roger Riggs
On Mon, 6 Feb 2023 11:44:07 GMT, SUN Guoyun wrote: >> Hi all, >> When -Xcomp be used, this testcase will use more codecaches, causing the GC >> to be triggered early, then causing this test failed on LoongArch64 >> architecture. >> >> This PR fix the issue, Please help review it. >> >>

Re: JEP415: FilterInThread Example

2023-02-06 Thread Roger Riggs
CompSci) Author of "The Java™ Specialists' Newsletter" -www.javaspecialists.eu Java Champion -www.javachampions.org JavaOne Rock Star Speaker Tel: +30 69 75 595 262 Skype: kabutz On 2023/02/06 06:55, Roger Riggs wrote: Hi Heinz, Indeed, this example is not intuitive and does not do what was

Re: JEP415: FilterInThread Example

2023-02-05 Thread Roger Riggs
Hi Heinz, Indeed, this example is not intuitive and does not do what was intended and could use a better explanation. The interaction of three filters gets complicated and their combination depends on the ordering and intention of each filter and the particular filter factory goal. The

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v6]

2023-02-03 Thread Roger Riggs
On Thu, 2 Feb 2023 15:44:54 GMT, Per Minborg wrote: >> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for >> values in the range [-18h, 18h] for each second that is on an even quarter >> of an hour (i.e. at most 2*18*4+1 = 145 values). >> >> Instead of using a

Re: RFR: 8301737: java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java fail with -Xcomp

2023-02-03 Thread Roger Riggs
On Fri, 3 Feb 2023 03:52:39 GMT, SUN Guoyun wrote: > Hi all, > When -Xcomp be used, java thread to block for longer, then causing this test > failed frequently on the AArch64 and LoongArch64 architecture. > > This PR fix the issue, Please help review it. > > Thanks. What is the connection

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

2023-02-02 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 > implicitly uses the access flags from the current/most recent class file > fo

Re: RFR: 8300235: Use VarHandle access in Image(Input | Output)StreamImpl classes [v3]

2023-02-02 Thread Roger Riggs
On Thu, 2 Feb 2023 15:04:57 GMT, Per Minborg wrote: >> This PR suggests improving performance by using the newly introduced class >> `jdk.internal.util.ByteArray` to improve packing/unpacking operations. >> >> The PR also proposes adding a `ByteArrayLittleEndian` class for support for >>

Re: RFR: 8299576: Reimplement java.io.Bits using VarHandle access [v7]

2023-01-30 Thread Roger Riggs
On Mon, 9 Jan 2023 09:22:25 GMT, Per Minborg wrote: >> Currently, `java.io.Bits` is using explicit logic to read/write various >> primitive types to/from byte arrays. Switching to the use of `VarHandle` >> access would provide better performance and less code. >> >> Also, using a standard

Re: RFR: 8299807: newStringNoRepl should avoid copying arrays for ASCII compatible charsets

2023-01-28 Thread Roger Riggs
On Fri, 20 Jan 2023 16:47:27 GMT, Glavo wrote: > This is the javadoc of `JavaLangAccess::newStringNoRepl`: > > > /** > * Constructs a new {@code String} by decoding the specified subarray of > * bytes using the specified {@linkplain java.nio.charset.Charset > charset}. > *

Re: RFR: 8299807: newStringNoRepl should avoid copying arrays for ASCII compatible charsets

2023-01-27 Thread Roger Riggs
On Fri, 20 Jan 2023 16:47:27 GMT, Glavo wrote: > This is the javadoc of `JavaLangAccess::newStringNoRepl`: > > > /** > * Constructs a new {@code String} by decoding the specified subarray of > * bytes using the specified {@linkplain java.nio.charset.Charset > charset}. > *

Re: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2]

2023-01-27 Thread Roger Riggs
On Fri, 27 Jan 2023 21:27:57 GMT, Raffaello Giulietti wrote: >> test/jdk/java/util/Formatter/BasicInt.java line 1: >> >>> 1: /* >> >> It looks line the non-float/double test classes are unchanged, they could be >> dropped from the PR. > > The only changes I made myself in the test files are

Re: RFR: 8300869: Make use of the Double.toString(double) algorithm in java.util.Formatter [v2]

2023-01-27 Thread Roger Riggs
On Fri, 27 Jan 2023 18:19:58 GMT, Raffaello Giulietti wrote: >> Align `double` and `float` decimal conversions in `java.util.Formatter` with >> the algorithm used in `Double.toString(double)`. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit

Re: RFR: 8300924: Method::invoke throws wrong exception type when passing wrong number of arguments to method with 4 or more parameters

2023-01-26 Thread Roger Riggs
On Tue, 24 Jan 2023 18:19:22 GMT, Mandy Chung wrote: > A simple fix in core reflection to check if the number of actual and formal > parameters differ before invoking the method or the constructor regardless of > whether it's a specialized case or not. LGTM - Marked as reviewed

Re: RFR: 8300235: Use VarHandle access in Image(Input | Output)StreamImpl classes

2023-01-26 Thread Roger Riggs
On Wed, 25 Jan 2023 16:39:04 GMT, Per Minborg wrote: > This PR suggests improving performance by using the newly introduced class > `jdk.internal.util.ByteArray` to improve packing/unpacking operations. > > The PR also proposes adding a `ByteArrayLittleEndian` class for support for > little

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections [v5]

2023-01-24 Thread Roger Riggs
On Tue, 24 Jan 2023 19:38:58 GMT, Viktor Klang wrote: >> Currently Set.copyOf allocates both a HashSet and a new empty array when the >> input collection is empty. >> >> This patch avoids allocating anything for the case where the parameter >> collection's isEmpty returns true. > > Viktor

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes [v8]

2023-01-24 Thread Roger Riggs
On Tue, 24 Jan 2023 12:44:17 GMT, Per Minborg wrote: >> This PR proposes using a performance optimization using a new supported API >> for operations similar to those found in `java.io.Bits` > > Per Minborg has updated the pull request incrementally with one additional > commit since the last

Re: RFR: 8300864: Declare some fields in java.io as final

2023-01-23 Thread Roger Riggs
On Mon, 23 Jan 2023 14:24:16 GMT, Per Minborg wrote: > Some of the fields in java.io can be declared as final. Marked as reviewed by rriggs (Reviewer). - PR: https://git.openjdk.org/jdk/pull/12140

Re: RFR: 8300863: Remove C-style array declarations in java.io

2023-01-23 Thread Roger Riggs
On Mon, 23 Jan 2023 13:53:38 GMT, Per Minborg wrote: > Some variables are declared using old-style declarations. These should be > modified to conform to modern style. > > This is a task derived from https://github.com/openjdk/jdk/pull/11848 Marked as reviewed by rriggs (Reviewer).

Re: RFR: 8300868: Reduce visibility in java.io.SerialCallbackContext [v2]

2023-01-23 Thread Roger Riggs
On Mon, 23 Jan 2023 15:36:01 GMT, Per Minborg wrote: >> This PR proposes to reduce the visibility for constructor and methods in >> `java.io.SerialCallbackContext`. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Update

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes

2023-01-20 Thread Roger Riggs
On Wed, 18 Jan 2023 16:34:57 GMT, Per Minborg wrote: > This PR proposes using a performance optimization using a new supported API > for operations similar to those found in `java.io.Bits` src/java.base/share/classes/java/io/ObjectStreamClass.java line 2486: > 2484: ); > 2485:

Re: RFR: JDK-8300698: Missing @since tag for ClassFileFormatVersion.RELEASE_21

2023-01-19 Thread Roger Riggs
On Thu, 19 Jan 2023 21:52:16 GMT, Joe Darcy wrote: > The addition of the new enum constant for ClassFileFormatVersion.RELEASE_21 > neglected to include an @since tag; this should be corrected. Marked as reviewed by rriggs (Reviewer). - PR: https://git.openjdk.org/jdk/pull/12107

Re: RFR: 8300236: Use VarHandle access in Data(Input | Output)Stream classes

2023-01-19 Thread Roger Riggs
On Wed, 18 Jan 2023 16:34:57 GMT, Per Minborg wrote: > This PR proposes using a performance optimization using a new supported API > for operations similar to those found in `java.io.Bits` Some comments: src/java.base/share/classes/jdk/internal/util/Bits.java line 43: > 41: } > 42: >

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-8300594: Use generalized see and link tags in UnicastRemoteObject

2023-01-18 Thread Roger Riggs
On Wed, 18 Jan 2023 21:27:03 GMT, Joe Darcy wrote: > Use improved anchor syntax in UnicastRemoteObject. LGTM - Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/12083

Re: RFR: 8299807: String.newStringUTF8NoRepl and getBytesUTF8NoRepl always copy arrays

2023-01-17 Thread Roger Riggs
On Mon, 9 Jan 2023 03:34:55 GMT, Glavo wrote: > `JavaLangAccess::newStringUTF8NoRepl` and > `JavaLangAccess::getBytesUTF8NoRepl` are not implemented correctly. They > always copy arrays, rather than avoiding copying as much as possible as > javadoc says. > > I ran the tier1 test without any

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: 8298047: Remove all non-significant trailing whitespace from properties files [v2]

2023-01-16 Thread Roger Riggs
On Mon, 16 Jan 2023 16:50:06 GMT, Magnus Ihse Bursie wrote: >> [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729) was created in an >> attempt to remove all trailing whitespace from properties files, and enable >> a jcheck verification that they did not come back, similar to other

[jdk20] Integrated: 8299034: Runtime::exec clarification of inherited environment

2023-01-12 Thread Roger Riggs
On Wed, 11 Jan 2023 18:31:06 GMT, Roger Riggs wrote: > The current description of Runtime.exec, ProcessBuilder.start, and > ProcessBuilder.startPipeline identifies a minimum set of system dependent > environment variables needed to launch a process and allows additional system &g

[jdk20] RFR: 8299034: Runtime::exec clarification of inherited environment

2023-01-11 Thread Roger Riggs
The current description of Runtime.exec, ProcessBuilder.start, and ProcessBuilder.startPipeline identifies a minimum set of system dependent environment variables needed to launch a process and allows additional system dependent environment variables to be present in the child. However, it does

Re: RFR: 8299571: ZoneRulesProvider.registerProvider() can leave inconsistent state on failure

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 17:17:41 GMT, Naoto Sato wrote: > Fixing the subject method to recover gracefully on a failed > `ZoneRulesProvider` registration. LGTM - Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/11928

Re: RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs [v2]

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 18:02:22 GMT, Justin Lu wrote: >> The javadocs of the following methods used deprecated constructors of the >> primitive wrapper classes: >> >> java.lang.ArrayStoreException >> java.lang.ClassCastException >> java.lang.Double.compare(double, double) >>

Re: RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs [v2]

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 18:02:22 GMT, Justin Lu wrote: >> The javadocs of the following methods used deprecated constructors of the >> primitive wrapper classes: >> >> java.lang.ArrayStoreException >> java.lang.ClassCastException >> java.lang.Double.compare(double, double) >>

Re: RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs [v2]

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 18:02:22 GMT, Justin Lu wrote: >> The javadocs of the following methods used deprecated constructors of the >> primitive wrapper classes: >> >> java.lang.ArrayStoreException >> java.lang.ClassCastException >> java.lang.Double.compare(double, double) >>

Re: RFR: 8299513: Clean up java.io [v5]

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 15:52:51 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/io/ObjectStreamConstants.java line 38: >> >>> 36: * Magic number that is written to the stream header. >>> 37: */ >>> 38: short STREAM_MAGIC = (short)0xaced; >> >> I'd prefer to retain the

Re: RFR: 8299513: Clean up java.io [v6]

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 16:06:15 GMT, Per Minborg wrote: >> Code in java.io contains many legacy constructs and semantics not >> recommended including: >> >> * C-style array declaration >> * Unnecessary visibility >> * Redundant keywords in interfaces (e.g. public, static) >> * Non-standard

Re: RFR: 8299513: Cleanup java.io [v5]

2023-01-10 Thread Roger Riggs
On Tue, 10 Jan 2023 13:34:49 GMT, Per Minborg wrote: >> Code in java.io contains many legacy constructs and semantics not >> recommended including: >> >> * C-style array declaration >> * Unnecessary visibility >> * Redundant keywords in interfaces (e.g. public, static) >> * Non-standard

Re: RFR: 8299444 java.util.Set.copyOf allocates needlessly for empty input collections

2023-01-04 Thread Roger Riggs
On Wed, 4 Jan 2023 14:41:20 GMT, Viktor Klang wrote: > Currently Set.copyOf allocates both a HashSet and a new empty array when the > input collection is empty. > > This patch avoids allocating anything for the case where the parameter > collection's isEmpty returns true. LGTM -

Re: RFR: 8299237: add ArraysSupport.newLength test to a test group

2022-12-22 Thread Roger Riggs
On Thu, 22 Dec 2022 19:49:42 GMT, Stuart Marks wrote: > Thanks. Do you think I should push this into JDK 20 instead of 21? Yes, if the test should be run (and has not been running) pushing to 20 will get it running sooner on the release that ships next. - PR:

Re: RFR: 8299237: add ArraysSupport.newLength test to a test group

2022-12-22 Thread Roger Riggs
On Thu, 22 Dec 2022 19:37:12 GMT, Stuart Marks wrote: > This test isn't part of any test group, so it isn't being run regularly! I'm > adding it to the jdk_util_other test group. Or you can push to 21 and then use the lightweight "/backport" command. - PR:

Re: RFR: 8299237: add ArraysSupport.newLength test to a test group

2022-12-22 Thread Roger Riggs
On Thu, 22 Dec 2022 19:37:12 GMT, Stuart Marks wrote: > This test isn't part of any test group, so it isn't being run regularly! I'm > adding it to the jdk_util_other test group. LGTM; Test fixes are ok for JDK 20 backport. - Marked as reviewed by rriggs (Reviewer). PR:

[jdk20] Integrated: 4958969: ObjectOutputStream example leads to non-working code

2022-12-19 Thread Roger Riggs
On Mon, 19 Dec 2022 20:12:15 GMT, Roger Riggs wrote: > Update javadoc examples to use try-with-resources and use javadoc snippet > tags. > The examples in ObjectInputStream and ObjectOutputStream get an update with > try-with-resources and use of javadoc snippet tags. > Ob

Re: [jdk20] RFR: 4958969: ObjectOutputStream example leads to non-working code [v2]

2022-12-19 Thread Roger Riggs
of html markup. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Simplify ObjectInputExample based on review comments. - Changes: - all: https://git.openjdk.org/jdk20/pull/59/files - new: https://git.openjdk.org/jdk2

Re: [jdk20] RFR: 4958969: ObjectOutputStream example leads to non-working code

2022-12-19 Thread Roger Riggs
On Mon, 19 Dec 2022 20:22:22 GMT, Lance Andersen wrote: >> Update javadoc examples to use try-with-resources and use javadoc snippet >> tags. >> The examples in ObjectInputStream and ObjectOutputStream get an update with >> try-with-resources and use of javadoc snippet tags. >>

[jdk20] RFR: 4958969: ObjectOutputStream example leads to non-working code

2022-12-19 Thread Roger Riggs
Update javadoc examples to use try-with-resources and use javadoc snippet tags. The examples in ObjectInputStream and ObjectOutputStream get an update with try-with-resources and use of javadoc snippet tags. ObjectInputFilter is updated with use of snippet tags instead of html markup.

Re: RFR: 8298567: Make field in RandomAccessFile final [v2]

2022-12-12 Thread Roger Riggs
On Mon, 12 Dec 2022 14:26:40 GMT, Per Minborg wrote: >> This PR proposes making a field in `RandomAccessFile` final. Also, it >> modernises a switch statement. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Make the field

Re: RFR: 8298380: Clean up redundant array length checks in JDK code base

2022-12-09 Thread Roger Riggs
On Thu, 8 Dec 2022 12:37:17 GMT, Sergey Tsypanov wrote: > Newer version of IntelliJ IDEA introduces new > [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases) > detecting redundant array length check in snippets like >

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: 8298380: Clean up redundant array length checks in JDK code base

2022-12-09 Thread Roger Riggs
On Thu, 8 Dec 2022 12:37:17 GMT, Sergey Tsypanov wrote: > Newer version of IntelliJ IDEA introduces new > [inspection](https://youtrack.jetbrains.com/issue/IDEA-301797/IDEA-should-report-redundant-array-length-check-in-certain-cases) > detecting redundant array length check in snippets like >

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

2022-12-07 Thread Roger Riggs
On Wed, 7 Dec 2022 20:17:57 GMT, Joe Darcy wrote: >> Should the masking out unassigned bits that is done in this method be >> extended to the existing `AccessFlag.maskToAccessFlags(mask, location)`; >> Instead of throwing `IllegalArgumentException`? >> The two methods should be consistent in

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

2022-12-07 Thread Roger Riggs
On Tue, 6 Dec 2022 03:33:25 GMT, Joe Darcy wrote: >> I would propose to say: >> >> Mask bits that do not match an {@code AccessFlag} for the location and >> class file format version are ignored. >> >> The case arises when the mask argument contains mask bits that are not >>

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: 8298033: Character.codePointAt(char[], int, int) doesn't do JavaDoc-specified check [v6]

2022-12-06 Thread Roger Riggs
On Tue, 6 Dec 2022 18:39:28 GMT, Sergey Tsypanov wrote: >> I found out that this code >> >> public class Main { >> public static void main(String[] args) { >> String s = "Hello world!"; >> char[] chars = s.toCharArray(); >> int point = Character.codePointAt(chars,

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: 8298033: Character.codePointAt(char[], int, int) doesn't do JavaDoc-specified check [v5]

2022-12-06 Thread Roger Riggs
On Tue, 6 Dec 2022 15:28:24 GMT, Sergey Tsypanov wrote: >> I found out that this code >> >> public class Main { >> public static void main(String[] args) { >> String s = "Hello world!"; >> char[] chars = s.toCharArray(); >> int point = Character.codePointAt(chars,

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

2022-12-06 Thread Roger Riggs
e flags for a particular mask, Location, > and class file format version: Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Class.accessFlags(): Remove an overeaching requirement on array component type AccessFlag.maskToAccessFlags(m

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

2022-12-05 Thread Roger Riggs
On Mon, 5 Dec 2022 21:47:29 GMT, Joe Darcy wrote: >> Roger Riggs has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Updated the descriptions of AccessFlags being dependent on the class file >> version num

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

2022-12-05 Thread Roger Riggs
On Mon, 5 Dec 2022 21:43:03 GMT, Joe Darcy wrote: >> Roger Riggs has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Updated the descriptions of AccessFlags being dependent on the class file >> version num

Re: RFR: 8298033: Character.codePointAt(char[], int, int) doesn't do JavaDoc-specified check [v3]

2022-12-05 Thread Roger Riggs
On Mon, 5 Dec 2022 13:22:36 GMT, Sergey Tsypanov wrote: >> Yeah, this AIOOBE is exactly the reason why I added this. So should we >> modify `codePointBefore` in the same way as `codePointAt`? > > I'm asking because counter-intuitively `codePointBefore ` doesn't specify > IOOBE for negative

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

2022-12-05 Thread Roger Riggs
e flags for a particular mask, Location, > and class file format version: Roger Riggs has updated the pull request incrementally with two additional commits since the last revision: - Updated the descriptions of AccessFlags being dependent on the class file version number. Removed unnecess

Re: RFR: 8298033: Character.codePointAt(char[], int, int) doesn't do JavaDoc-specified check [v3]

2022-12-02 Thread Roger Riggs
On Fri, 2 Dec 2022 18:53:21 GMT, Sergey Tsypanov wrote: >> I found out that this code >> >> public class Main { >> public static void main(String[] args) { >> String s = "Hello world!"; >> char[] chars = s.toCharArray(); >> int point = Character.codePointAt(chars,

Re: RFR: 8298033: Character.codePointAt(char[], int, int) doesn't do JavaDoc-specified check

2022-12-02 Thread Roger Riggs
On Fri, 2 Dec 2022 12:44:18 GMT, Sergey Tsypanov wrote: > I found out that this code > > public class Main { > public static void main(String[] args) { > String s = "Hello world!"; > char[] chars = s.toCharArray(); > int point = Character.codePointAt(chars, -1, 1); >

Re: RFR: 8298033: Character.codePointAt(char[], int, int) doesn't do JavaDoc-specified check

2022-12-02 Thread Roger Riggs
On Fri, 2 Dec 2022 15:00:15 GMT, Sergey Tsypanov wrote: > The reason why it was passing prior to these changes is that > `ArrayIndexOutOfBoundsException` extends `IndexOutOfBoundsException` and the > latter is caught in the test. Perhaps then, tighten up the test. It seems odd to have a case

Re: RFR: 8298033: Character.codePointAt(char[], int, int) doesn't do JavaDoc-specified check

2022-12-02 Thread Roger Riggs
On Fri, 2 Dec 2022 12:44:18 GMT, Sergey Tsypanov wrote: > I found out that this code > > public class Main { > public static void main(String[] args) { > String s = "Hello world!"; > char[] chars = s.toCharArray(); > int point = Character.codePointAt(chars, -1, 1); >

Re: RFR: 8297561: Redundant index check in String.offsetByCodePoints() [v4]

2022-12-01 Thread Roger Riggs
On Thu, 1 Dec 2022 08:14:07 GMT, Sergey Tsypanov wrote: >> `String.offsetByCodePoints()` delegates to `Character.offsetByCodePoints()` >> which in turn specifies the same exception thrown under the same conditions >> and the implementation does exactly the same checks. This means we can >>

Re: RFR: 8297561: Redundant index check in String.offsetByCodePoints() [v2]

2022-11-30 Thread Roger Riggs
On Wed, 30 Nov 2022 18:17:47 GMT, Sergey Tsypanov wrote: >> `String.offsetByCodePoints()` delegates to `Character.offsetByCodePoints()` >> which in turn specifies the same exception thrown under the same conditions >> and the implementation does exactly the same checks. This means we can >>

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: 8297528: java/io/File/TempDirDoesNotExist.java test failing on windows-x64

2022-11-28 Thread Roger Riggs
On Mon, 28 Nov 2022 16:52:09 GMT, Weibing Xiao wrote: > fix the illegal characters of directory names in Windows LGTM - Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/11393

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist [v5]

2022-11-23 Thread Roger Riggs
Please review a PR to put the test on the ProblemList until the test is fixed. https://github.com/openjdk/jdk/pull/11334 Thanks, Roger On 11/23/22 3:27 PM, Daniel D. Daugherty wrote: On Mon, 21 Nov 2022 16:35:46 GMT, Weibing Xiao wrote: print warning message for java.io.tmpdir when it is

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

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 16:40:10 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/util/FormatProcessor.java line 85: >> >>> 83: >>> 84: /** >>> 85: * {@inheritDoc} >> >> The javadoc should describe in more detail what `process` does and the >> errors than can occur. >> That

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

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 13:55:38 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

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

2022-11-23 Thread Roger Riggs
On Tue, 22 Nov 2022 20:17:41 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/util/FormatProcessor.java line 64: >> >>> 62: * >>> 63: * @implSpec Since, values are found within the string template, >>> argument indexing >>> 64: * specifiers are unsupported. >> >> What is the

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

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 13:55:38 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: 8297451: ProcessHandleImpl should assert privilege when modifying reaper thread

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 08:38:02 GMT, Chris Hegarty wrote: >> This commit guards thread modifications for the process reaper thread with >> doPrivileged. > > src/java.base/share/classes/jdk/internal/misc/InnocuousThread.java line 137: > >> 135: public static Thread newSystemThread(String name,

Re: RFR: 8297385: Remove duplicated null typos in javadoc

2022-11-23 Thread Roger Riggs
On Wed, 23 Nov 2022 06:58:09 GMT, Dongxu Wang wrote: > 8297385: Remove duplicated null typos in javadoc Looks good. - Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.org/jdk/pull/11311

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

2022-11-22 Thread Roger Riggs
On Mon, 21 Nov 2022 17:43:16 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: JDK 19 innocuous reaper threads

2022-11-22 Thread Roger Riggs
Hi Chris, Yes, adding a doPriv for setDaemon and setName in a couple of places makes sense. Thanks, Roger On 11/22/22 11:12 AM, Chris Hegarty wrote: Hi Alan, On 22/11/2022 16:08, Alan Bateman wrote: On 22/11/2022 15:21, Chris Hegarty wrote: .. Just to double check, does the ES

Re: RFR: 8297385: Remove duplicated null typos in javadoc

2022-11-22 Thread Roger Riggs
On Tue, 15 Nov 2022 15:05:45 GMT, Dongxu Wang wrote: > 8297385: Remove duplicated null typos in javadoc The source of this PR is the "master" branch of your fork. Note the Comment from the bot at the top. The conventional usage is to create a branch specific to the change you are making and

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

2022-11-18 Thread Roger Riggs
On Fri, 18 Nov 2022 14:10:11 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

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

2022-11-18 Thread Roger Riggs
On Thu, 17 Nov 2022 17:12:53 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/template/StringTemplate.java line 233: >> >>> 231: >>> 232: /** >>> 233: * Returns a StringTemplate with the given fragments and values. >> >> Suggestion: >> >> * Returns a {@code

Re: Task for an aspiring JDK contributor

2022-11-18 Thread Roger Riggs
Hi, I agree the exception message could be added to facilitate the understanding and the resolution of UnsupportedOperationExceptions from List implementations. New issue: https://bugs.openjdk.org/browse/JDK-8297283 As to what should be included in the message, that will need more

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist [v4]

2022-11-18 Thread Roger Riggs
On Fri, 18 Nov 2022 18:36:51 GMT, Weibing Xiao wrote: >> print warning message for java.io.tmpdir when it is set through the command >> line and the value is not good for creating file folder. > > Weibing Xiao has updated the pull request incrementally with one additional > commit since the

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist [v3]

2022-11-18 Thread Roger Riggs
On Fri, 18 Nov 2022 14:45:56 GMT, Weibing Xiao wrote: >> print warning message for java.io.tmpdir when it is set through the command >> line and the value is not good for creating file folder. > > Weibing Xiao has updated the pull request incrementally with one additional > commit since the

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist [v2]

2022-11-18 Thread Roger Riggs
On Wed, 16 Nov 2022 15:03:37 GMT, Roger Riggs wrote: >> Weibing Xiao has updated the pull request incrementally with one additional >> commit since the last revision: >> >> the change according to review comment > > src/java.base/share/classes/jdk/internal

Re: RFR: JDK-8296743: Tighten Class.getModifiers spec for array classes

2022-11-18 Thread Roger Riggs
On Fri, 18 Nov 2022 03:26:38 GMT, Joe Darcy wrote: > Update the spec of Class.getModifiers to match long-standing behavior for > primitive and array classes. Remove unneeded implementation flexibility with > regard to setting other bit positions. This work was prompted to better > support

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

2022-11-17 Thread Roger Riggs
On Wed, 16 Nov 2022 20:33:50 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

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

2022-11-16 Thread Roger Riggs
On Mon, 14 Nov 2022 17:51:24 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

Re: RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist [v2]

2022-11-16 Thread Roger Riggs
On Wed, 16 Nov 2022 14:02:32 GMT, Weibing Xiao wrote: >> print warning message for java.io.tmpdir when it is set through the command >> line and the value is not good for creating file folder. > > Weibing Xiao has updated the pull request incrementally with one additional > commit since the

Integrated: 8294899: Process.waitFor() throws IllegalThreadStateException when a process on Windows returns an exit code of 259

2022-11-14 Thread Roger Riggs
On Wed, 12 Oct 2022 16:30:07 GMT, Roger Riggs wrote: > Process.waitFor() throws IllegalThreadStateException when a process returns > an exit code of 259. > As described in the bug report, `waitFor()` should not be sensitive to the > exit value. > Previously, it er

Re: RFR: 8294899: Process.waitFor() throws IllegalThreadStateException when a process on Windows returns an exit code of 259 [v2]

2022-11-11 Thread Roger Riggs
On Thu, 10 Nov 2022 12:33:05 GMT, Jaikiran Pai wrote: > One final question - Now with this change, `Process.waitFor()` won't throw > the `IllegalThreadStateException` for such programs that return > `STILL_ACTIVE` exit code. However, looking at the code a subsequent > Process.exitValue() call

Re: RFR: 8291911: java/io/File/GetXSpace.java fails with "53687091200 != 161051996160" [v3]

2022-11-09 Thread Roger Riggs
On Tue, 11 Oct 2022 20:50:15 GMT, Brian Burkhalter wrote: >> On Windows, suppress failure if the total space indicated by `df` is less >> than `FileStore::getTotalSpace` and the free space indicated by `df` equals >> `FileStore::getUnallocatedSpace`. > > Brian Burkhalter has updated the pull

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v8]

2022-11-08 Thread Roger Riggs
On Tue, 8 Nov 2022 17:20:39 GMT, Claes Redestad wrote: >> Continuing the work initiated by @luhenry to unroll and then intrinsify >> polynomial hash loops. >> >> I've rewired the library changes to route via a single `@IntrinsicCandidate` >> method. To make this work I've harmonized how they

Re: RFR: 8294899: Process.waitFor() throws IllegalThreadStateException when a process on Windows returns an exit code of 259

2022-11-08 Thread Roger Riggs
On Fri, 21 Oct 2022 06:04:34 GMT, Jaikiran Pai wrote: >> Process.waitFor() throws IllegalThreadStateException when a process returns >> an exit code of 259. >> As described in the bug report, `waitFor()` should not be sensitive to the >> exit value. >> Previously, it erroneously threw

Re: RFR: 8294899: Process.waitFor() throws IllegalThreadStateException when a process on Windows returns an exit code of 259 [v2]

2022-11-08 Thread Roger Riggs
> Process.waitFor() throws IllegalThreadStateException when a process returns > an exit code of 259. > As described in the bug report, `waitFor()` should not be sensitive to the > exit value. > Previously, it erroneously threw IllegalStateException. > Added a test to verify

Re: RFR: 8294899: Process.waitFor() throws IllegalThreadStateException when a process on Windows returns an exit code of 259

2022-11-08 Thread Roger Riggs
On Wed, 12 Oct 2022 16:30:07 GMT, Roger Riggs wrote: > Process.waitFor() throws IllegalThreadStateException when a process returns > an exit code of 259. > As described in the bug report, `waitFor()` should not be sensitive to the > exit value. > Previously, it er

Integrated: 8295370: Update java.io.ObjectStreamField to use Class.descriptorString

2022-10-14 Thread Roger Riggs
On Fri, 14 Oct 2022 18:23:58 GMT, Roger Riggs wrote: > The code in ObjectStreamField for constructing type signatures should be > replaced by Class.descriptorString(). > The corresponding change is made in ObjectStreamClass. > There is no change to the contents of the

<    5   6   7   8   9   10   11   12   >