Re: RFR: 8333796: Add missing serialization functionality to sun.reflect.ReflectionFactory [v4]

2024-09-24 Thread Roger Riggs
On Fri, 20 Sep 2024 22:01:23 GMT, David M. Lloyd wrote: >> Issue [JDK-8164908](https://bugs.openjdk.org/browse/JDK-8164908) added >> support for functionality required to continue to support IIOP and custom >> serializers in light of additional module-based restrictions on reflection. >> It wa

Re: RFR: 8333796: Add missing serialization functionality to sun.reflect.ReflectionFactory [v5]

2024-09-24 Thread Roger Riggs
On Tue, 24 Sep 2024 19:40:23 GMT, David M. Lloyd wrote: >> Issue [JDK-8164908](https://bugs.openjdk.org/browse/JDK-8164908) added >> support for functionality required to continue to support IIOP and custom >> serializers in light of additional module-based restrictions on reflection. >> It wa

Re: RFR: 8333796: Add missing serialization functionality to sun.reflect.ReflectionFactory [v3]

2024-09-20 Thread Roger Riggs
On Thu, 29 Aug 2024 14:33:08 GMT, David M. Lloyd wrote: >> Issue [JDK-8164908](https://bugs.openjdk.org/browse/JDK-8164908) added >> support for functionality required to continue to support IIOP and custom >> serializers in light of additional module-based restrictions on reflection. >> It wa

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v7]

2024-09-20 Thread Roger Riggs
On Fri, 20 Sep 2024 08:14:04 GMT, Per Minborg wrote: >> This PR suggests introducing an internal class in `java.base` to simplify >> the use of some `MethodHandles.Lookup` operations. >> >> While the utility of the methods might appear to be limited in classes with >> many static `VarHandle`/`

Re: RFR: 8339735: Remove references to Applet in core-libs/security APIs [v2]

2024-09-18 Thread Roger Riggs
On Wed, 18 Sep 2024 17:59:40 GMT, Justin Lu wrote: >> Please review this PR which removes occurrences of 'applet' within the >> corelibs specification. Applet has been deprecated since JDK9, and may be a >> confusing term for new Java developers, so it should be removed from the >> documentati

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances [v4]

2024-09-17 Thread Roger Riggs
On Tue, 17 Sep 2024 13:05:24 GMT, Per Minborg wrote: >> This PR suggests introducing an internal class in `java.base` to simplify >> the use of some `MethodHandles.Lookup` operations. >> >> While the utility of the methods might appear to be limited in classes with >> many static `VarHandle`/`

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances

2024-09-12 Thread Roger Riggs
On Thu, 12 Sep 2024 17:38:44 GMT, Per Minborg wrote: > This PR suggests introducing an internal class in `java.base` to simplify the > use of some `MethodHandles.Lookup` operations. > > While the utility of the methods might appear to be limited in classes with > many static `VarHandle`/`Metho

Re: RFR: 8339487: ProcessHandleImpl os_getChildren sysctl call - retry in case of ENOMEM and enhance exception message [v3]

2024-09-06 Thread Roger Riggs
On Fri, 6 Sep 2024 07:05:22 GMT, Matthias Baesken wrote: >> When running jtreg test java/lang/ProcessHandle/PermissionTest.java on >> macOS, a few times this error occurs : >> >> java.lang.RuntimeException: Cannot allocate memory >>at java.base/java.lang.ProcessHandleImpl.getProcessPids

Re: RFR: 8311530: Deprecate jdk.jsobject module for removal

2024-09-05 Thread Roger Riggs
On Mon, 12 Aug 2024 17:22:47 GMT, Kevin Rushforth wrote: > Deprecate the `jdk.jsobject` module for removal from the JDK, and ship it > with JavaFX instead. > > See [JDK-8337280](https://bugs.openjdk.org/browse/JDK-8337280) / PR > openjdk/jfx#1529 for the JavaFX PR that will include the module

Re: RFR: 8338489: Typo in MemorySegment doc

2024-08-27 Thread Roger Riggs
On Tue, 27 Aug 2024 10:42:08 GMT, Per Minborg wrote: > This trivial PR proposes to fix a typo in the `MemorySegment` docs. lgtm - Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20727#pullrequestreview-2263488201

Re: RFR: 8338690: CompactNumberInstance.format incorrectly formats some numbers (few vs many)

2024-08-23 Thread Roger Riggs
On Fri, 23 Aug 2024 17:54:55 GMT, Roger Riggs wrote: >> Fixing an issue wrt wrong plural suffix with compact format for some >> locales. It was retrieving the suffix based on the value before the >> rounding, which ended up in wrong plural expression. > > src/java.base

Re: RFR: 8338690: CompactNumberInstance.format incorrectly formats some numbers (few vs many)

2024-08-23 Thread Roger Riggs
On Thu, 22 Aug 2024 16:14:08 GMT, Naoto Sato wrote: > Fixing an issue wrt wrong plural suffix with compact format for some locales. > It was retrieving the suffix based on the value before the rounding, which > ended up in wrong plural expression. lgtm - Marked as reviewed by rri

Re: RFR: 8338690: CompactNumberInstance.format incorrectly formats some numbers (few vs many)

2024-08-23 Thread Roger Riggs
On Thu, 22 Aug 2024 16:14:08 GMT, Naoto Sato wrote: > Fixing an issue wrt wrong plural suffix with compact format for some locales. > It was retrieving the suffix based on the value before the rounding, which > ended up in wrong plural expression. src/java.base/share/classes/java/text/CompactN

Integrated: 8338060: jdk/internal/util/ReferencedKeyTest should be more robust

2024-08-12 Thread Roger Riggs
On Fri, 9 Aug 2024 15:54:51 GMT, Roger Riggs wrote: > Addressing latent issues with ReferencedKeyTest > - During the `methods()` tests the keys should be strongly held to avoid > inadvertent GC collection and subsequent test failures (JDK-8336926) > - Merge changes from Valhalla t

Re: RFR: 8333796: Add missing serialization functionality to sun.reflect.ReflectionFactory

2024-08-12 Thread Roger Riggs
On Thu, 13 Jun 2024 14:31:06 GMT, David M. Lloyd wrote: > Issue [JDK-8164908](https://bugs.openjdk.org/browse/JDK-8164908) added > support for functionality required to continue to support IIOP and custom > serializers in light of additional module-based restrictions on reflection. > It was ex

RFR: 8338060: jdk/internal/util/ReferencedKeyTest should be more robust

2024-08-09 Thread Roger Riggs
Addressing latent issues with ReferencedKeyTest - During the `methods()` tests the keys should be strongly held to avoid inadvertent GC collection and subsequent test failures (JDK-8336926) - Merge changes from Valhalla to use String (identity objects) for keys instead of Integer and Long that ar

Integrated: 8336926: jdk/internal/util/ReferencedKeyTest.java can fail with ConcurrentModificationException

2024-08-08 Thread Roger Riggs
On Wed, 7 Aug 2024 19:26:59 GMT, Roger Riggs wrote: > The original test fails intermittently, the reproducer failed consistently. > With the fix, the failure was not observed in the test or reproducer. > > In jdk.internal.util.ReferencedKeyMap.entrySet() and toString() metho

Re: RFR: 8336926: jdk/internal/util/ReferencedKeyTest.java can fail with ConcurrentModificationException

2024-08-08 Thread Roger Riggs
On Wed, 7 Aug 2024 19:26:59 GMT, Roger Riggs wrote: > The original test fails intermittently, the reproducer failed consistently. > With the fix, the failure was not observed in the test or reproducer. > > In jdk.internal.util.ReferencedKeyMap.entrySet() and toString() metho

RFR: 8336926: jdk/internal/util/ReferencedKeyTest.java can fail with ConcurrentModificationException

2024-08-07 Thread Roger Riggs
The original test fails intermittently, the reproducer failed consistently. With the fix, the failure was not observed in the test or reproducer. In jdk.internal.util.ReferencedKeyMap.entrySet() and toString() methods, avoid removing stale references that would modify the keyset while it is being

Re: RFR: 8337840: Remove redundant null check in ObjectOutputStream.writeProxyDesc

2024-08-07 Thread Roger Riggs
On Fri, 26 Jul 2024 13:09:19 GMT, Andrey Turbanov wrote: > There is implicit null check in line before. > > https://github.com/openjdk/jdk/blob/431d4f7e18369466eedd00926a5162a1461d0b25/src/java.base/share/classes/java/io/ObjectOutputStream.java#L1267-L1277 > > 'cl' can't be null after that. lg

Re: RFR: 8337838: Remove unused methods from ChronoLocalDateImpl

2024-08-07 Thread Roger Riggs
On Fri, 19 Jul 2024 09:52:50 GMT, Andrey Turbanov wrote: > A few methods in `java.time.chrono.ChronoLocalDateImpl` are unused and could > be removed: > 1. plusWeeks(long) > 2. minusYears(long) > 3. minusMonths(long) > 4. minusWeeks(long) > 5. minusDays(long) > > Tested `test/jdk/java/time` on L

Re: RFR: 8337838: Remove unused methods from ChronoLocalDateImpl

2024-08-06 Thread Roger Riggs
On Fri, 19 Jul 2024 09:52:50 GMT, Andrey Turbanov wrote: > A few methods in `java.time.chrono.ChronoLocalDateImpl` are unused and could > be removed: > 1. plusWeeks(long) > 2. minusYears(long) > 3. minusMonths(long) > 4. minusWeeks(long) > 5. minusDays(long) > > Tested `test/jdk/java/time` on L

Re: RFR: 8336043: Add quality of implementation discussion to Object.{equals, toString, hashCode} [v4]

2024-08-06 Thread Roger Riggs
On Wed, 31 Jul 2024 01:46:09 GMT, Joe Darcy wrote: >> First pass at adding some quality of implementation discussions around the >> overridable methods of Object. > > Joe Darcy has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the

Re: RFR: 8336934: Clean up JavaLangReflectAccess [v2]

2024-07-26 Thread Roger Riggs
On Thu, 25 Jul 2024 22:33:44 GMT, Chen Liang wrote: >> Removed redundant APIs in `JavaLangReflectAccess` and added general warning >> against using `SharedSecrets`. >> >> The cleanup in `JavaLangReflectAccess` is: >> - Converted `newConstructor` taking parameters to taking another constructor

Re: RFR: 8337279: Optimize format instant [v2]

2024-07-26 Thread Roger Riggs
On Fri, 26 Jul 2024 15:53:11 GMT, Andriy Plokhotnyuk wrote: > Could you please review [these](https://github.com/openjdk/jdk/pull/11986) > proposed changes for instantiation of `Instant` values with already > normalized nanos? @plokhotnyuk Your contribution cannot be acted upon until the OCA i

Re: RFR: 8336934: Clean up JavaLangReflectAccess

2024-07-25 Thread Roger Riggs
On Tue, 23 Jul 2024 04:10:38 GMT, Chen Liang wrote: > Removed redundant APIs in `JavaLangReflectAccess` and added general warning > against using `SharedSecrets`. src/java.base/share/classes/java/lang/reflect/Constructor.java line 168: > 166: } > 167: > 168: /** Creates a new root con

Re: RFR: 8336934: Clean up JavaLangReflectAccess

2024-07-25 Thread Roger Riggs
On Tue, 23 Jul 2024 04:10:38 GMT, Chen Liang wrote: > Removed redundant APIs in `JavaLangReflectAccess` and added general warning > against using `SharedSecrets`. The description should include a summary of the changes and the rationale. The Jira description is a bit better and could also be mo

Re: RFR: 8337167: StringSize deduplication [v2]

2024-07-25 Thread Roger Riggs
On Thu, 25 Jul 2024 14:29:05 GMT, Shaojin Wen wrote: >> Integer.stringSize and Long.stringSize are used not only in java.lang, but >> also in other places. We put stringSize in DecimalDigits to reduce duplicate >> code and the use of JLA. > > Shaojin Wen has updated the pull request incremental

Re: RFR: 8337168: Optimize LocalDateTime.toString

2024-07-25 Thread Roger Riggs
On Thu, 25 Jul 2024 05:06:17 GMT, Shaojin Wen wrote: > The current LocalDateTime.toString implementation concatenates the toString > results of date and time, which can be passed to StringBuilder to reduce > additional object allocation and improve performance. src/java.base/share/classes/java

Re: RFR: 8337167: StringSize deduplication [v2]

2024-07-25 Thread Roger Riggs
On Thu, 25 Jul 2024 14:29:05 GMT, Shaojin Wen wrote: >> Integer.stringSize and Long.stringSize are used not only in java.lang, but >> also in other places. We put stringSize in DecimalDigits to reduce duplicate >> code and the use of JLA. > > Shaojin Wen has updated the pull request incremental

Re: RFR: 8336741: Optimize LocalTime.toString with StringBuilder.repeat [v4]

2024-07-24 Thread Roger Riggs
On Thu, 18 Jul 2024 15:43:05 GMT, Shaojin Wen wrote: >> class LocalTime { >> public String toString() { >> // ... >> if (nanoValue % 1000_000 == 0) { >> buf.append(Integer.toString((nanoValue / 1000_000) + >> 1000).substring(1)); >>

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v7]

2024-07-23 Thread Roger Riggs
On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with one additio

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v7]

2024-07-23 Thread Roger Riggs
On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with one additio

Re: RFR: 8335791: Speed ​​up j.u.Formatter & String.format [v4]

2024-07-22 Thread Roger Riggs
On Sat, 6 Jul 2024 00:15:04 GMT, Shaojin Wen wrote: >> String.format is widely used, and improving its performance is very >> meaningful. This PR can significantly improve the performance of >> String.format. Sorry, there are many changes, which will take a lot of time. >> I hope you can revie

Re: RFR: 8334394: Race condition in Class::protectionDomain [v3]

2024-07-22 Thread Roger Riggs
On Mon, 22 Jul 2024 12:42:48 GMT, Weijun Wang wrote: >> Make sure `pd` is always the same object when `getProtectionDomain0` is null. > > Weijun Wang has updated the pull request incrementally with two additional > commits since the last revision: > > - var to real type > - rename Marked as

Re: RFR: 8336706: Optimize LocalDate.toString with StringBuilder.repeat

2024-07-19 Thread Roger Riggs
On Thu, 18 Jul 2024 05:21:36 GMT, Shaojin Wen wrote: > class LocalDate { > public String toString() { > if (absYear < 1000) { > if (yearValue < 0) { > buf.append(yearValue - 1).deleteCharAt(1); > } else { > buf.append(yearVal

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v5]

2024-07-19 Thread Roger Riggs
On Fri, 19 Jul 2024 21:42:09 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with two additio

Re: RFR: 8336792: DateTimeFormatterBuilder append zeros based on StringBuilder.repeat

2024-07-19 Thread Roger Riggs
On Thu, 18 Jul 2024 23:36:37 GMT, Shaojin Wen wrote: > The StringBuilder.repeat method was added in JDK 21, which can be used to > make some minor optimizations to existing code, including > DateTimeFormatterBuilder lgtm - Marked as reviewed by rriggs (Reviewer). PR Review: http

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-19 Thread Roger Riggs
On Thu, 18 Jul 2024 21:50:31 GMT, Naoto Sato wrote: >> The `ProcessTools` override is a delegating override; I think it still makes >> sense and should be kept. > > I think the test tool should not depend on the internal implementation, so I > think it should be kept. Its still unnecessary, ad

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-19 Thread Roger Riggs
On Thu, 18 Jul 2024 20:51:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8333396: Use StringBuilder internally for java.text.Format.* formatting [v21]

2024-07-19 Thread Roger Riggs
On Fri, 19 Jul 2024 13:03:31 GMT, Chen Liang wrote: >> lingjun-cg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 896: Use StringBuilder internally for java.text.Format.* formatting > > src/java.base/share/classes/java/text/Format.ja

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v5]

2024-07-18 Thread Roger Riggs
On Thu, 18 Jul 2024 20:51:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8336479: Provide Process.waitFor(Duration) [v3]

2024-07-18 Thread Roger Riggs
On Thu, 18 Jul 2024 18:16:48 GMT, Naoto Sato wrote: >> Proposing a new overload method for `Process#waitFor()` which takes a >> `Duration` for the timeout value. This will reduce the possibility for >> making mistakes with the `TimeUnit` in the other overload method. A >> corresponding CSR has

Re: RFR: 8334772: Change Class::signers to an explicit field [v3]

2024-07-18 Thread Roger Riggs
On Thu, 18 Jul 2024 13:48:06 GMT, Chen Liang wrote: >> `Class` has 2 VM-injected fields that can be made explicit: `Object[] >> signers` and `ProtectionDomain protectionDomain`. We make the signers field >> explicit. (The ProtectionDomain can be revisited when SecurityManager is >> removed, as

Re: RFR: 8334394: Race condition in Class::protectionDomain [v2]

2024-07-18 Thread Roger Riggs
On Mon, 17 Jun 2024 15:24:27 GMT, Weijun Wang wrote: >> Make sure `pd` is always the same object when `getProtectionDomain0` is null. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > explain why the test is related to the fix

Re: RFR: 8336741: Optimize LocalTime.toString with StringBuilder.repeat

2024-07-18 Thread Roger Riggs
On Thu, 18 Jul 2024 11:32:47 GMT, Shaojin Wen wrote: > class LocalTime { > public String toString() { > // ... > if (nanoValue % 1000_000 == 0) { > buf.append(Integer.toString((nanoValue / 1000_000) + > 1000).substring(1)); > } else

Re: RFR: 8333796: Add missing serialization functionality to sun.reflect.ReflectionFactory

2024-07-16 Thread Roger Riggs
On Thu, 13 Jun 2024 14:31:06 GMT, David M. Lloyd wrote: > Issue [JDK-8164908](https://bugs.openjdk.org/browse/JDK-8164908) added > support for functionality required to continue to support IIOP and custom > serializers in light of additional module-based restrictions on reflection. > It was ex

Re: RFR: 8335637: Add explicit well-behaved expectations to Object.{toString, hashCode} [v3]

2024-07-08 Thread Roger Riggs
On Mon, 8 Jul 2024 20:32:52 GMT, Joe Darcy wrote: >> Make well-behaved implementation expectations of Object.{toString, hashCode} >> explicit. > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review feedback. Looks

Re: RFR: 8335366: Improve String.format performance with fastpath [v12]

2024-07-02 Thread Roger Riggs
On Mon, 1 Jul 2024 19:17:50 GMT, Shaojin Wen wrote: >> We need a String format solution with good performance. String Template was >> once expected, but it has been removed. j.u.Formatter is powerful, but its >> performance is not good enough. >> >> This PR implements a subset of j.u.Formatter

Re: RFR: 8334490: Normalize string with locale invariant `toLowerCase()`

2024-06-19 Thread Roger Riggs
On Tue, 18 Jun 2024 18:23:12 GMT, Naoto Sato wrote: > The test library `jdk.test.lib.Platform` uses no-arg `toLowerCase()` for > string comparison, which should be avoided. Marked as reviewed by rriggs (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/19775#pullrequestrevi

Re: RFR: 8309821: Link to hidden classes section in Class specification for Class::isHidden

2024-06-19 Thread Roger Riggs
On Wed, 19 Jun 2024 02:21:05 GMT, Joe Darcy wrote: > Simple doc improvement. Marked as reviewed by rriggs (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/19781#pullrequestreview-2128478464

Re: RFR: 8317611: Add a tool like jdeprscan to find usage of restricted methods

2024-06-19 Thread Roger Riggs
On Tue, 18 Jun 2024 16:30:37 GMT, Jorn Vernee wrote: > This PR adds a new JDK tool, called `jnativescan`, that can be used to find > code that accesses native functionality. Currently this includes `native` > method declarations, and methods marked with `@Restricted`. > > The tool accepts a li

Re: RFR: 8333854: IllegalAccessError with proxies after JDK-8332457 [v3]

2024-06-12 Thread Roger Riggs
On Wed, 12 Jun 2024 20:48:41 GMT, Chen Liang wrote: >> Please review this patch that fixes a critical issue that breaks some Proxy >> usages. >> >> Since the problematic patch from before cannot be backed out, this patch >> aims to emulate the old behavior before. A diff between before the >>

Re: RFR: 8333854: IllegalAccessError with proxies after JDK-8332457 [v2]

2024-06-12 Thread Roger Riggs
On Mon, 10 Jun 2024 04:08:41 GMT, Chen Liang wrote: >> Please review this patch that fixes a critical issue that breaks some Proxy >> usages. >> >> CONSTANT_Class and CONSTANT_MethodType must fail resolution for inaccessible >> package-private types per JVMS 5.4.3.1 and 5.4.3.5, yet such types

Re: RFR: 8333854: IllegalAccessError with proxies after JDK-8332457 [v2]

2024-06-11 Thread Roger Riggs
On Mon, 10 Jun 2024 04:08:41 GMT, Chen Liang wrote: >> Please review this patch that fixes a critical issue that breaks some Proxy >> usages. >> >> CONSTANT_Class and CONSTANT_MethodType must fail resolution for inaccessible >> package-private types per JVMS 5.4.3.1 and 5.4.3.5, yet such types

Re: RFR: 8222884: ConcurrentClassDescLookup.java times out intermittently

2024-06-11 Thread Roger Riggs
On Tue, 11 Jun 2024 13:09:21 GMT, Jaikiran Pai wrote: > Can I please get a review of this test-only change which proposes to address > intermittent failures in > `test/jdk/java/io/Serializable/concurrentClassDescLookup/ConcurrentClassDescLookup.java`? > > This addresses https://bugs.openjdk.or

Re: RFR: 8333742: ProcessImpl and ProcessHandleImpl may mishandle processes that exit with code 259 [v2]

2024-06-10 Thread Roger Riggs
On Mon, 10 Jun 2024 16:28:39 GMT, Daniel Jeliński wrote: >> `GetExitCodeProcess` method is not reliable for checking if a process exited >> already; it returns 259 (STILL_ACTIVE) if the process hasn't exited yet, but >> the same value is returned when the process exited with code 259. In order

Re: RFR: 8333742: ProcessImpl and ProcessHandleImpl may mishandle processes that exit with code 259 [v2]

2024-06-10 Thread Roger Riggs
On Mon, 10 Jun 2024 16:24:27 GMT, Daniel Jeliński wrote: >> Another reason to retain the checking of GetThreadInterruptEvent is to be >> belt and suspenders against the Java code changing and opening up a >> potential error. At the moment, the reaper thread is encapsulated and not >> likely to

Re: RFR: 8333742: ProcessImpl and ProcessHandleImpl may mishandle processes that exit with code 259

2024-06-10 Thread Roger Riggs
On Fri, 7 Jun 2024 21:13:56 GMT, Roger Riggs wrote: >> Interesting. Could you point me to a related bug / documentation / evidence? >> I tested the WaitForSingleObject version (commit >> 6524747a5ebc51c760b14e90309c5f18b58b20e2) on Windows 11, and I didn't >&

Re: RFR: 8333742: ProcessImpl and ProcessHandleImpl may mishandle processes that exit with code 259

2024-06-07 Thread Roger Riggs
On Fri, 7 Jun 2024 20:56:03 GMT, Daniel Jeliński wrote: >> I think waiting on JVM_GetThreadInterruptEvent() is necessary during VM >> shutdown to allow the blocked thread to exit cleanly. > > Interesting. Could you point me to a related bug / documentation / evidence? > I tested the WaitForSing

Re: RFR: 8333742: ProcessImpl and ProcessHandleImpl may mishandle processes that exit with code 259

2024-06-07 Thread Roger Riggs
On Fri, 7 Jun 2024 20:52:38 GMT, Daniel Jeliński wrote: >> The `WaitForSingleObject(handle, 0)` seems like an indirect way to determine >> if the process is alive. >> Whereas `isProcessAlive(handle)` seems to directly answer the question. > > sorry, I still don't get it. Are you telling me that

Re: RFR: 8333742: ProcessImpl and ProcessHandleImpl may mishandle processes that exit with code 259

2024-06-07 Thread Roger Riggs
On Fri, 7 Jun 2024 16:05:06 GMT, Daniel Jeliński wrote: >> src/java.base/windows/native/libjava/ProcessHandleImpl_win.c line 128: >> >>> 126: JNU_ThrowByNameWithLastError(env, >>> 127: "java/lang/RuntimeException", >>> "WaitForMultipleObjects"); >>> 128: } el

Re: RFR: 8333742: ProcessImpl and ProcessHandleImpl may mishandle processes that exit with code 259

2024-06-07 Thread Roger Riggs
On Thu, 6 Jun 2024 18:40:51 GMT, Daniel Jeliński wrote: > `GetExitCodeProcess` method is not reliable for checking if a process exited > already; it returns 259 (STILL_ACTIVE) if the process hasn't exited yet, but > the same value is returned when the process exited with code 259. In order to

Re: RFR: 8332586: Avoid cloning empty arrays in java.lang.reflect.{Method,Constructor} [v6]

2024-05-31 Thread Roger Riggs
On Fri, 31 May 2024 18:39:33 GMT, jengebr wrote: >> Improve `java/lang/reflect/Method.java` by eliminating needless cloning of >> Class[0] instances. This cloning is intended to prevent callers from >> changing array contents, but many Methods have zero exceptions or zero >> parameters, and

Re: RFR: 8332586: Avoid cloning empty arrays in java.lang.reflect.{Method,Constructor}

2024-05-30 Thread Roger Riggs
On Tue, 21 May 2024 13:49:18 GMT, jengebr wrote: > Improve `java/lang/reflect/Method.java` by eliminating needless cloning of > Class[0] instances. This cloning is intended to prevent callers from > changing array contents, but smany Methods have zero exceptions or zero > parameters, and ret

Re: RFR: 8332589: ubsan: unix/native/libjava/ProcessImpl_md.c:562:5: runtime error: null pointer passed as argument 2, which is declared to never be null [v3]

2024-05-24 Thread Roger Riggs
On Fri, 24 May 2024 07:24:13 GMT, Matthias Baesken wrote: >> When building with ubsan enabled (--enable-uban) on Linux x86_64 and doing >> jtreg tests afterwards I run into this error : >> >> /jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c:562:5: runtime >> error: null pointer passed a

Re: RFR: 8332589: ubsan: unix/native/libjava/ProcessImpl_md.c:562:5: runtime error: null pointer passed as argument 2, which is declared to never be null [v2]

2024-05-23 Thread Roger Riggs
leArray.hpp:290:10: runtime error: null pointer passed >> as argument 1, which is declared to never be null > > Matthias Baesken has updated the pull request incrementally with one > additional commit since the last revision: > > remarks Roger Riggs LGTM - Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19329#pullrequestreview-2074031918

Re: RFR: 8332589: ubsan: unix/native/libjava/ProcessImpl_md.c:562:5: runtime error: null pointer passed as argument 2, which is declared to never be null

2024-05-22 Thread Roger Riggs
On Tue, 21 May 2024 14:28:38 GMT, Matthias Baesken wrote: > When building with ubsan enabled (--enable-uban) on Linux x86_64 and doing > jtreg tests afterwards I run into this error : > > /jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c:562:5: runtime error: > null pointer passed as arg

Integrated: 8331224: ClassCastException in ObjectInputStream hides ClassNotFoundException

2024-05-21 Thread Roger Riggs
On Wed, 1 May 2024 18:43:21 GMT, Roger Riggs wrote: > The issue reported a ClassCastException "cannot assign instance of > java.util.CollSer to field of type java.util.Map" > while deserializing an object referring to an immutable Map that contained a > reference t

Re: RFR: 8331224: ClassCastException in ObjectInputStream hides ClassNotFoundException [v2]

2024-05-17 Thread Roger Riggs
checked > between reading the fields and invoking the constructor to create the record > or assigning the fields to an object being constructed. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add description of exception behavior wh

Re: RFR: 8331224: ClassCastException in ObjectInputStream hides ClassNotFoundException

2024-05-17 Thread Roger Riggs
On Wed, 1 May 2024 18:43:21 GMT, Roger Riggs wrote: > The issue reported a ClassCastException "cannot assign instance of > java.util.CollSer to field of type java.util.Map" > while deserializing an object referring to an immutable Map that contained a > reference t

Re: RFR: 8331224: ClassCastException in ObjectInputStream hides ClassNotFoundException

2024-05-17 Thread Roger Riggs
On Thu, 16 May 2024 21:18:04 GMT, Stuart Marks wrote: >> The issue reported a ClassCastException "cannot assign instance of >> java.util.CollSer to field of type java.util.Map" >> while deserializing an object referring to an immutable Map that contained a >> reference to a class that was not a

Re: Deterministic naming of subclasses of `java/lang/reflect/Proxy`

2024-05-16 Thread Roger Riggs
't be referenced by name, only as a capability, they can be better encapsulated. fyi, Roger Riggs On 5/16/24 8:11 AM, Aman Sharma wrote: Hi, Thanks for your response, Liang! > I think you meant CVE-2021-42392 instead of 2022. Sorry of the error. I indeed meant CVE-2021-

Re: RFR: 8331646: Add specific regression leap year tests [v5]

2024-05-10 Thread Roger Riggs
On Fri, 10 May 2024 09:22:39 GMT, serhiysachkov wrote: >> Calendar.add() tests that describe its behavior. > > serhiysachkov has updated the pull request incrementally with one additional > commit since the last revision: > > JDK-8331646 fixing typo A bit late but the descriptions of the pro

Re: RFR: JDK-8331646: Add specific regression leap year tests (Task - P4)

2024-05-06 Thread Roger Riggs
On Fri, 3 May 2024 10:31:14 GMT, serhiysachkov wrote: > Calendar.add() tests that describe its behavior. The bug report and/or the PR description should describe the change in more detail. What conditions of the Calendar spec are being tested. Thanks - PR Comment: https://git.ope

Re: RFR: 8330276: Console methods with explicit Locale [v2]

2024-05-03 Thread Roger Riggs
On Mon, 29 Apr 2024 23:22:21 GMT, Naoto Sato wrote: >> Proposing new overloaded methods in `java.io.Console` class that explicitly >> take a `Locale` argument. Existing methods rely on the default locale, so >> the users won't be able to format their prompts/outputs in a certain locale >> expl

Re: In support of Instant.minus(Instant)

2024-05-03 Thread Roger Riggs
Hi, I would also reinforce Stephen's early observation that the pattern for "until" methods in java.time includes those of the XXXDate classes, with a single Temporal parameter.  Period and Duration are similar values holding relative TemporalAmounts.     public Period until(ChronoLocalDate

Re: RFR: 8331202: Support for Duration until another Instant [v3]

2024-05-02 Thread Roger Riggs
On Wed, 1 May 2024 17:21:20 GMT, Naoto Sato wrote: >> A new method on Instant to return the duration `until` another Instant is >> suggested per the following discussion thread: >> >> https://mail.openjdk.org/pipermail/core-libs-dev/2024-April/122131.html >> >> A CSR has also been drafted. > >

Re: RFR: 8331202: Support for Duration until another Instant [v3]

2024-05-01 Thread Roger Riggs
On Wed, 1 May 2024 17:21:20 GMT, Naoto Sato wrote: >> A new method on Instant to return the duration `until` another Instant is >> suggested per the following discussion thread: >> >> https://mail.openjdk.org/pipermail/core-libs-dev/2024-April/122131.html >> >> A CSR has also been drafted. > >

RFR: 8331224: ClassCastException in ObjectStreamClass during deserialization - cannot assign instance of java.util.CollSer to field of type java.util.Map

2024-05-01 Thread Roger Riggs
The issue reported a ClassCastException "cannot assign instance of java.util.CollSer to field of type java.util.Map" while deserializing an object referring to an immutable Map that contained a reference to a class that was not available. Immutable Collections such as Map utilize a serialization

Re: RFR: 8330276: Console methods with explicit Locale [v2]

2024-05-01 Thread Roger Riggs
On Mon, 29 Apr 2024 23:22:21 GMT, Naoto Sato wrote: >> Proposing new overloaded methods in `java.io.Console` class that explicitly >> take a `Locale` argument. Existing methods rely on the default locale, so >> the users won't be able to format their prompts/outputs in a certain locale >> expl

Re: In support of Instant.minus(Instant)

2024-04-26 Thread Roger Riggs
A constructive API enhancement. Created JDK-8331202 Support for duration between Instants Regards, Roger On 4/25/24 4:53 PM, Stephen Colebourne wrote: java.time.* already has the `until(ChronoLocalDate)` method on LocalDate. It would be reasonable

Integrated: 8329805: Deprecate for removal ObjectOutputStream.PutField.write

2024-04-25 Thread Roger Riggs
On Tue, 16 Apr 2024 19:44:36 GMT, Roger Riggs wrote: > The method `java.io.ObjectOutputStream.PutField.write` has been deprecated > since 1.4 and should be deprecated for removal. The Deprecation annotation is > updated to indicate the intention to remov the method. This pull reques

Re: RFR: 8330624: Inconsistent use of semicolon in the code snippet of java.io.Serializable javadoc

2024-04-25 Thread Roger Riggs
On Sat, 20 Apr 2024 11:49:30 GMT, Korov wrote: > Fix the description of java.io.Serializable. LGTM; trivial fix of example javadoc code - Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18874#pullrequestreview-2022703632

Re: RFR: 8330802: Desugar switch in Locale::createLocale [v2]

2024-04-22 Thread Roger Riggs
On Mon, 22 Apr 2024 14:11:41 GMT, Claes Redestad wrote: >> This switch expression in `Locale::createLocale` is causing a somewhat large >> startup regression on my local system. Desugaring to if statements seem like >> the right thing to do while we investigate ways to further reduce overheads

Re: RFR: 8329760: Add indexOf(Predicate filter) to java..util.List interface [v9]

2024-04-19 Thread Roger Riggs
On Fri, 19 Apr 2024 12:59:24 GMT, Evemose wrote: >> **Subject** >> Addition of Predicate-based `indexOf` and `lastIndexOf` methods to >> `java.util.List` >> >> **Motivation** >> The motivation behind this proposal is to enhance the functionality of the >> `List` interface by providing a more f

RFR: 8329805: Deprecate for removal ObjectOutputStream.PutField.write

2024-04-16 Thread Roger Riggs
The method `java.io.ObjectOutputStream.PutField.write` has been deprecated since 1.4 and should be deprecated for removal. The Deprecation annotation is updated to indicate the intention to remov the method. - Commit messages: - 8329805: Deprecate for removal ObjectOutputStream.Put

Re: RFR: 8212895: ChronoField.INSTANT_SECONDS's range doesn't match the range of Instant [v3]

2024-04-16 Thread Roger Riggs
On Wed, 10 Apr 2024 16:17:32 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix the issue >> noted in https://bugs.openjdk.org/browse/JDK-8212895? >> >> As noted in that issue, the `ChronoField.INSTANT_SECONDS` currently is >> initialized to have a minim

Re: RFR: 8212895: ChronoField.INSTANT_SECONDS's range doesn't match the range of Instant [v2]

2024-04-09 Thread Roger Riggs
On Tue, 9 Apr 2024 08:34:39 GMT, Jaikiran Pai wrote: >> Should `INSTANT_SECONDS("InstantSeconds", SECONDS, FOREVER, >> ValueRange.of(Instant.MIN.getEpochSecond(), Instant.MAX.getEpochSecond())), >> ` work? > > Hello Naoto, that's a very good point. I was too caught up with the constant > values

Re: RFR: 8212895: ChronoField.INSTANT_SECONDS's range doesn't match the range of Instant [v2]

2024-04-09 Thread Roger Riggs
On Tue, 9 Apr 2024 08:37:29 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix the issue >> noted in https://bugs.openjdk.org/browse/JDK-8212895? >> >> As noted in that issue, the `ChronoField.INSTANT_SECONDS` currently is >> initialized to have a minimu

Re: RFR: 8212895: ChronoField.INSTANT_SECONDS's range doesn't match the range of Instant

2024-04-08 Thread Roger Riggs
On Mon, 8 Apr 2024 18:00:02 GMT, Naoto Sato wrote: >> Can I please get a review of this change which proposes to fix the issue >> noted in https://bugs.openjdk.org/browse/JDK-8212895? >> >> As noted in that issue, the `ChronoField.INSTANT_SECONDS` currently is >> initialized to have a minimum

Integrated: 8329623: NegativeArraySizeException encoding large String to UTF-8

2024-04-08 Thread Roger Riggs
On Fri, 5 Apr 2024 17:44:38 GMT, Roger Riggs wrote: > When encoding a vary large string in String.getBytes(StandardCharset.UTF_8) > computation of the buffer size may exceed the range of a positive 32-bit > Integer. > If the estimated size for the result byte array is too large,

Re: RFR: 8329623: NegativeArraySizeException encoding large String to UTF-8

2024-04-08 Thread Roger Riggs
On Mon, 8 Apr 2024 13:39:34 GMT, Roger Riggs wrote: >> test/jdk/java/lang/String/CompactString/MaxSizeUTF16String.java line 143: >> >>> 141: // Strings of size min+1...min+2, throw OOME >>> 142: // The resulting byte array would exceed implementati

Re: RFR: 8329623: NegativeArraySizeException encoding large String to UTF-8

2024-04-08 Thread Roger Riggs
On Mon, 8 Apr 2024 08:54:21 GMT, Raffaello Giulietti wrote: >> When encoding a vary large string in String.getBytes(StandardCharset.UTF_8) >> computation of the buffer size may exceed the range of a positive 32-bit >> Integer. >> If the estimated size for the result byte array is too large, pr

Re: RFR: 8329623: NegativeArraySizeException encoding large String to UTF-8

2024-04-05 Thread Roger Riggs
On Fri, 5 Apr 2024 20:17:39 GMT, Naoto Sato wrote: > LGTM. The test case could be more thorough if it tests strings with > supplementary codepoints, as the new method computes them exclusively. I considered that, but the worst case is the x3 expansion. A 2 character high/low surrogate pair wou

RFR: 8329623: NegativeArraySizeException encoding large String to UTF-8

2024-04-05 Thread Roger Riggs
When encoding a vary large string in String.getBytes(StandardCharset.UTF_8) computation of the buffer size may exceed the range of a positive 32-bit Integer. If the estimated size for the result byte array is too large, pre-compute the exact buffer size. If that exceeds the range, then throw Ou

Re: RFR: JDK-8329089: Empty immutable list throws the wrong exception type for remove(first | last) operations

2024-04-04 Thread Roger Riggs
On Tue, 2 Apr 2024 10:37:02 GMT, Per Minborg wrote: > This PR proposes to make empty immutable lists always throw UOE on > `removeFirst` and `removeLast`. LGTM - Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/18581#pullrequestreview-198014251

Re: RFR: JDK-8329089: Empty immutable list throws the wrong exception type for remove(first | last) operations

2024-04-03 Thread Roger Riggs
On Tue, 2 Apr 2024 10:37:02 GMT, Per Minborg wrote: > This PR proposes to make empty immutable lists always throw UOE on > `removeFirst` and `removeLast`. test/jdk/java/util/Collection/MOAT.java line 573: > 571: c::removeLast); > 572: } > 573: Would this test better if in

Re: RFR: 8328700: Unused import and variable should be deleted in regex package

2024-03-22 Thread Roger Riggs
On Fri, 22 Mar 2024 17:58:25 GMT, Raffaello Giulietti wrote: > Make use of an unused local variable probably intended to replace later casts. Marked as reviewed by rriggs (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/18460#pullrequestreview-195551

Re: CFV: New Core Libraries Group Member: Per-Ake Minborg

2024-03-19 Thread Roger Riggs
Vote: Yes On 3/19/24 11:19 AM, Daniel Fuchs wrote: I hereby nominate Per-Ake Minborg (pminborg) [1] to Membership in the Core Libraries Group [4].

  1   2   3   4   5   6   7   8   9   10   >