Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Peter Firmstone
On 27/10/2022 4:26 pm, Alan Bateman wrote: On 26/10/2022 23:53, Peter Firmstone wrote: The change will have some performance impact, by requiring redundant parsing. Just thought I'd mention it, in case it hasn't been thought of. If you do an internet search there are other implementations o

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Michael McMahon
On Thu, 27 Oct 2022 05:14:19 GMT, ExE Boss wrote: >> src/java.base/share/classes/java/net/JarURLConnection.java line 177: >> >>> 175: @SuppressWarnings("deprecation") >>> 176: var tmp = jarFileURL = new URL(spec.substring(0, separator++)); >>> 177: >> >> I realise that @Suppres

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Daniel Fuchs
On Thu, 27 Oct 2022 09:17:29 GMT, Michael McMahon wrote: >> Having unnamed local variables[^1] would probably be best for this. >> >> [^1]: https://openjdk.org/jeps/8294349 > > How about `_unused` or `_unused1`, `_unused2` then in the meantime? I'd be happy to make the change. Let's wait to see

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Daniel Fuchs
On 27/10/2022 07:26, Alan Bateman wrote: We have a strict URI 3986 implementation, which we use to create all URL instances from. Note also that though this change proposes to deprecate these constructors in order to provide a stronger warning against their potential misuse, it does not depreca

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Peter Firmstone
I'm considering using one of the non parsing constructors, as Alan points out we're currently double parsing.  By the time the constructor is removed, I'm guessing there will be a RFC3986 URI implementation in the JDK, so we'll change to that when it happens.   Or if you decide to not deprecate

Unused class java.net.InetAddressContainer

2022-10-27 Thread Andrey Turbanov
Hello. As I can see, the class 'java.net.InetAddressContainer' is unused in JDK java code. Is it somehow used by VM, or is it just leftovers from some refactorings? I wonder if we can drop it. Andrey Turbanov

Re: Unused class java.net.InetAddressContainer

2022-10-27 Thread Michael McMahon
Hi, That class was used in the old PlainSocketImpl socket implementation and was left over when we removed it. I'll file an issue to delete it. Thanks, Michael. On 27/10/2022 12:53, Andrey Turbanov wrote: Hello. As I can see, the class 'java.net.InetAddressContainer' is unused in JDK java

Re: RFR: 8295537: Enhance TRACE_METHOD_LINKAGE to show the target MethodHandle [v4]

2022-10-27 Thread Mandy Chung
On Thu, 27 Oct 2022 05:24:33 GMT, Ioi Lam wrote: >> Improve the handling of the >> `java.lang.invoke.MethodHandle.TRACE_METHOD_LINKAGE` property to print out >> the full graph of MethodHandles that are used at a CallSite. This helps us >> understand how invokedynamic call sites are resolved. F

Re: RFR: 8295000: java/util/Formatter/Basic test cleanup [v2]

2022-10-27 Thread Lance Andersen
On Wed, 26 Oct 2022 21:00:43 GMT, Justin Lu wrote: >> Issue: java/util/Formatter/Basic regression test emits lots of warning >> messages (~60). >> >> Fix: Made adjustments to Basic-X.java.template as the BasicXXX.java files >> where the errors originate from are generated from the template.

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Joe Wang
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote: > Deprecate URL constructors. Developers are encouraged to use `java.net.URI` > to parse or construct any URL. > > The `java.net.URL` class does not itself encode or decode any URL components > according to the escaping mechanism defined in

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Daniel Fuchs
On Thu, 27 Oct 2022 17:20:04 GMT, Joe Wang wrote: > Hi Daniel, if it's not a major improvement, we'd like to keep the java.xml > module at the JDK 8 code level. Can we remove the 'var' usage in a few > java.xml classes? No problem - I will make this change when we have settled on a name for th

Re: RFR: 8295000: java/util/Formatter/Basic test cleanup [v2]

2022-10-27 Thread Justin Lu
On Thu, 27 Oct 2022 17:13:23 GMT, Lance Andersen wrote: >> Justin Lu has updated the pull request with a new target base due to a merge >> or a rebase. The incremental webrev excludes the unrelated changes brought >> in by the merge/rebase. The pull request contains four additional commits >>

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Andrey Turbanov
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote: > Deprecate URL constructors. Developers are encouraged to use `java.net.URI` > to parse or construct any URL. > > The `java.net.URL` class does not itself encode or decode any URL components > according to the escaping mechanism defined in

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Daniel Fuchs
On Thu, 27 Oct 2022 17:50:37 GMT, Andrey Turbanov wrote: >> Deprecate URL constructors. Developers are encouraged to use `java.net.URI` >> to parse or construct any URL. >> >> The `java.net.URL` class does not itself encode or decode any URL components >> according to the escaping mechanism de

Re: RFR: JDK-8295756 Improve NonLocalRegistry Manual Test Process [v2]

2022-10-27 Thread Bill Huang
> The current non local registry tests require a manual process that runs > rmiregitrty on a different machine and changes the -Dregistry.host property > in the source before running the tests on the local machine. This task is > created to improve this manual process and provide a clearer instr

Re: RFR: JDK-8295756 Improve NonLocalRegistry Manual Test Process [v2]

2022-10-27 Thread Alan Bateman
On Thu, 27 Oct 2022 18:39:39 GMT, Bill Huang wrote: >> The current non local registry tests require a manual process that runs >> rmiregitrty on a different machine and changes the -Dregistry.host property >> in the source before running the tests on the local machine. This task is >> created

Re: RFR: JDK-8295756 Improve NonLocalRegistry Manual Test Process [v3]

2022-10-27 Thread Bill Huang
> The current non local registry tests require a manual process that runs > rmiregitrty on a different machine and changes the -Dregistry.host property > in the source before running the tests on the local machine. This task is > created to improve this manual process and provide a clearer instr

RFR: 8156593: DataOutput.write(byte[], int, int) and its implementations do not specify index out bounds

2022-10-27 Thread Brian Burkhalter
Add `@throws IndexOutOfBoundsException {@inheritDoc}` to some `write(byte[],int,int)` and `read(byte[],int,int)` methods of some classes in the `java.io` package to make things a bit clearer. - Commit messages: - 8156593: DataOutput.write(byte[],int,int) and its implementations do

Integrated: 8295000: java/util/Formatter/Basic test cleanup

2022-10-27 Thread Justin Lu
On Thu, 13 Oct 2022 01:02:43 GMT, Justin Lu wrote: > Issue: java/util/Formatter/Basic regression test emits lots of warning > messages (~60). > > Fix: Made adjustments to Basic-X.java.template as the BasicXXX.java files > where the errors originate from are generated from the template. > >

RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview)

2022-10-27 Thread Maurizio Cimadamore
This PR contains the API and implementation changes for JEP-434 [1]. A more detailed description of such changes, to avoid repetitions during the review process, is included as a separate comment. [1] - https://openjdk.org/jeps/434 - Commit messages: - Merge branch 'master' into P

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview)

2022-10-27 Thread Maurizio Cimadamore
On Wed, 26 Oct 2022 13:11:50 GMT, Maurizio Cimadamore wrote: > This PR contains the API and implementation changes for JEP-434 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.org

Re: RFR - Implementation of JEP-430 String Templates (Preview) CSR

2022-10-27 Thread Remi Forax
I would like to retract the comments i've made below, because the first point is now moot and for the second one, after some more thinking, it may be not that bad and at least the API is very simple to use. Rémi > From: "Remi Forax" > To: "Jim Laskey" > Cc: "core-libs-dev" > Sent: Wednesda

Re: [External] : Re: RFR - Implementation of JEP-430 String Templates (Preview) CSR

2022-10-27 Thread Jim Laskey
Try it out. The code has been sitting in the amber repo on the templated-strings branch all along. Cheers, — Jim 📱 On Oct 27, 2022, at 6:20 PM, Remi Forax wrote:  I would like to retract the comments i've made below, because the first point is now moot and for the second one, after some mo

Re: RFR: 8295537: Enhance TRACE_METHOD_LINKAGE to show the target MethodHandle [v3]

2022-10-27 Thread Ioi Lam
On Wed, 26 Oct 2022 21:55:46 GMT, Claes Redestad wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use Thread::getStackTrace() to find the caller's line number, etc > > Marked as reviewed by redestad (Reviewer). Thanks @

Integrated: 8295537: Enhance TRACE_METHOD_LINKAGE to show the target MethodHandle

2022-10-27 Thread Ioi Lam
On Mon, 24 Oct 2022 22:15:49 GMT, Ioi Lam wrote: > Improve the handling of the > `java.lang.invoke.MethodHandle.TRACE_METHOD_LINKAGE` property to print out > the full graph of MethodHandles that are used at a CallSite. This helps us > understand how invokedynamic call sites are resolved. For e

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Rob Leland
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote: > Deprecate URL constructors. Developers are encouraged to use `java.net.URI` > to parse or construct any URL. > > The `java.net.URL` class does not itself encode or decode any URL components > according to the escaping mechanism defined in

RFR: JDK-8285932 Implementation of JEP-430 String Templates (Preview)

2022-10-27 Thread Jim Laskey
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 evaluating that expression, possibly after further validation and tran

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

2022-10-27 Thread ExE Boss
On Thu, 27 Oct 2022 20:16:14 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 evaluatin

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-10-27 Thread Chris Plummer
On Fri, 7 Oct 2022 12:51:26 GMT, Alan Bateman wrote: >> Michael Ernst has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains six commits: >> >> - Reinstate typos in Apache code that is copied into the JDK >> - Merge ../jdk-openjdk into

RFR: 8294672: Typo in description of JDWP VirtualMachine/AllThreads command

2022-10-27 Thread Chris Plummer
Fix typo: "and and" => "and" - Commit messages: - fix typo in VirtualMachine.AllThreads Changes: https://git.openjdk.org/jdk/pull/10895/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10895&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8294672 Stats: 1 line in 1 fi

Re: RFR: 8294672: Typo in description of JDWP VirtualMachine/AllThreads command

2022-10-27 Thread Jaikiran Pai
On Fri, 28 Oct 2022 01:04:57 GMT, Chris Plummer wrote: > Fix typo: "and and" => "and" Marked as reviewed by jpai (Reviewer). - PR: https://git.openjdk.org/jdk/pull/10895

Withdrawn: 8291966: SwitchBootstrap.typeSwitch could be faster

2022-10-27 Thread duke
On Fri, 5 Aug 2022 16:12:08 GMT, Jan Lahoda wrote: > The pattern matching switches are using a bootstrap method > `SwitchBootstrap.typeSwitch` to implement the jumps in the switch. Basically, > for a switch like: > > switch (obj) { > case String s when s.isEmpty() -> {} > case String s

Withdrawn: 8289711: Add container configuration data to mbeans

2022-10-27 Thread duke
On Tue, 5 Jul 2022 04:21:55 GMT, xpbob wrote: > Container configuration information is useful for troubleshooting > problems,Exposing information in MBeans is ideal for monitoring, jConsole, > and other scenarios. > Results the following > ![图片](https://user-images.githubusercontent.com/7837910

Re: RFR: 8156593: DataOutput.write(byte[],int,int) and its implementations do not specify index out bounds

2022-10-27 Thread Andrey Turbanov
On Thu, 27 Oct 2022 20:35:26 GMT, Brian Burkhalter wrote: > Add `@throws IndexOutOfBoundsException {@inheritDoc}` to some > `write(byte[],int,int)` and `read(byte[],int,int)` methods of some classes in > the `java.io` package to make things a bit clearer. src/java.base/share/classes/java/io/Fi