Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v15]

2023-05-06 Thread Chen Liang
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does not allow future expansion to support SAM[^1] abstrac

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v14]

2023-05-06 Thread Chen Liang
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does not allow future expansion to support SAM[^1] abstrac

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v13]

2023-05-06 Thread Chen Liang
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does not allow future expansion to support SAM[^1] abstrac

Re: RFR: 8307466: java.time.Instant calculation bug in until and between methods

2023-05-06 Thread Raffaello Giulietti
On Fri, 5 May 2023 21:28:25 GMT, Roger Riggs wrote: > The implementation of java.time.Instant.until(I2, ChronoUnit) in some cases > did not correctly borrow or carry from the nanos to the seconds when > computing using ChronoUnit.MILLIS or ChronoUnit.MICROS. > The errant computation was introdu

Re: RFR: 8303040: linux PPC64le: Implementation of Foreign Function & Memory API (Preview) [v28]

2023-05-06 Thread Martin Doerr
> Implementation of "Foreign Function & Memory API" for linux on Power (Little > Endian) according to "Power Architecture 64-Bit ELF V2 ABI Specification". > > This PR does not include code for VaList support because it's supposed to get > removed by [JDK-8299736](https://bugs.openjdk.org/browse

RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type

2023-05-06 Thread Chen Liang
The access hack for array class clone is only applied to `checkAccess` but missing before call to `restrictProtectedReceiver`, causing the array receiver type to be incorrectly replaced by the lookupClass type. This patch fixes that and adds a test to ensure an original lookup resolves `clone` f

RFR: 8307575: Migrate the serialization constructor accessors to Method Handles

2023-05-06 Thread Chen Liang
Apparently method handle linking doesn't impose extra checks on constructor invocation, so the special logic for the serialization constructor to call superclass constructor in MagicAccessorImpl can be removed altogether with old core reflection implementation. Serialization and sun.reflect.Ref

Re: RFR: 8304913: Use OperatingSystem, Architecture, and Version in jlink [v3]

2023-05-06 Thread Alan Bateman
On Fri, 5 May 2023 13:59:37 GMT, Roger Riggs wrote: >> Refactor the Platform class of jlink to use jdk.internal.util >> OperatingSystem and Architecture instead of os.name and os.arch. >> They are direct replacements for the Platform enums except for UNKNOWN; its >> use is refactored to report

Re: RFR: 8302845: Replace finalizer usage in JNDI DNS provider with Cleaner [v2]

2023-05-06 Thread Alan Bateman
On Sat, 6 May 2023 09:50:06 GMT, Daniel Fuchs wrote: > I believe this is not quite right. The Cleanable returned by the `register` > method should be saved in a final field. And close() below should call > `Cleanable::clean` instead of `udpChannelSelector.close()` Selector::close is idempotent

Re: RFR: 8302845: Replace finalizer usage in JNDI DNS provider with Cleaner [v2]

2023-05-06 Thread Daniel Fuchs
On Fri, 5 May 2023 19:08:27 GMT, Aleksei Efimov wrote: >> JNDI `DnsClient` has a finalize method to close its internal datagram >> channel selector. >> The change proposed here replaces it with a cleaner to close the selector >> once the `DnsClient` >> instance becomes phantom reachable. >>

Re: RFR: 8307466: java.time.Instant calculation bug in until and between methods

2023-05-06 Thread Stephen Colebourne
On Fri, 5 May 2023 21:28:25 GMT, Roger Riggs wrote: > The implementation of java.time.Instant.until(I2, ChronoUnit) in some cases > did not correctly borrow or carry from the nanos to the seconds when > computing using ChronoUnit.MILLIS or ChronoUnit.MICROS. > The errant computation was introdu