Re: RFR: 8274879: Replace uses of StringBuffer with StringBuilder within java.base classes [v2]

2021-10-12 Thread Naoto Sato
On Tue, 12 Oct 2021 20:39:13 GMT, Andrey Turbanov wrote: >> StringBuffer is a legacy synchronized class. There are more modern >> alternatives which perform better: >> 1. Plain String concatenation should be preferred >> 2. StringBuilder is a direct replacement to StringBuffer which generally >

Re: RFR: 8274879: Replace uses of StringBuffer with StringBuilder within java.base classes [v2]

2021-10-12 Thread Andrey Turbanov
> StringBuffer is a legacy synchronized class. There are more modern > alternatives which perform better: > 1. Plain String concatenation should be preferred > 2. StringBuilder is a direct replacement to StringBuffer which generally have > better performance > > In [JDK-8264029](https://bugs.ope

Re: RFR: 8274879: Replace uses of StringBuffer with StringBuilder within java.base classes [v2]

2021-10-12 Thread Andrey Turbanov
On Tue, 12 Oct 2021 20:33:20 GMT, Naoto Sato wrote: >> reverted changes in this spec. > > Did you modify the PR? I am unable to locate the revert. Oops. Forgot to push - PR: https://git.openjdk.java.net/jdk/pull/5432

Re: RFR: 8274879: Replace uses of StringBuffer with StringBuilder within java.base classes [v2]

2021-10-12 Thread Naoto Sato
On Mon, 11 Oct 2021 21:05:46 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/java/lang/Character.java line 123: >> >>> 121: * than U+ are called supplementary characters. The Java >>> 122: * platform uses the UTF-16 representation in {@code char} arrays and >>> 123: * in the {

Re: RFR: 8260428: Drop support for pre JDK 1.4 DatagramSocketImpl implementations [v2]

2021-10-12 Thread Alan Bateman
On Tue, 12 Oct 2021 15:41:30 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my changes (and CSR) to drop support for pre JDK >> 1.4 `DatagramSocketImpl` implementations? >> >> These changes propose to drop support for `DatagramSocketImpls` that were >> compiled with J

Re: RFR: 8244202: Implementation of JEP 418: Internet-Address Resolution SPI [v3]

2021-10-12 Thread Aleksei Efimov
> This change implements a new service provider interface for host name and > address resolution, so that java.net.InetAddress API can make use of > resolvers other than the platform's built-in resolver. > > The following API classes are added to `java.net.spi` package to facilitate > this: > -

Re: RFR: 8260428: Drop support for pre JDK 1.4 DatagramSocketImpl implementations [v2]

2021-10-12 Thread Patrick Concannon
On Tue, 12 Oct 2021 11:15:55 GMT, Daniel Fuchs wrote: >> src/java.base/share/classes/java/net/DatagramSocketImpl.java line 105: >> >>> 103: * >>> 104: * @implSpec the default implementation of this method always >>> throws {@code SocketException} >>> 105: * >> >> The implementat

Re: RFR: 8260428: Drop support for pre JDK 1.4 DatagramSocketImpl implementations [v2]

2021-10-12 Thread Patrick Concannon
On Tue, 12 Oct 2021 11:20:01 GMT, Daniel Fuchs wrote: >> Patrick Concannon 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 three additional >> c

Re: RFR: 8260428: Drop support for pre JDK 1.4 DatagramSocketImpl implementations [v2]

2021-10-12 Thread Patrick Concannon
On Tue, 12 Oct 2021 07:10:56 GMT, Vyom Tewari wrote: >> Patrick Concannon 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 three additional >> co

Re: RFR: 8260428: Drop support for pre JDK 1.4 DatagramSocketImpl implementations [v2]

2021-10-12 Thread Patrick Concannon
> Hi, > > Could someone please review my changes (and CSR) to drop support for pre JDK > 1.4 `DatagramSocketImpl` implementations? > > These changes propose to drop support for `DatagramSocketImpls` that were > compiled with JDK 1.3 or older, which do not have support for connected > sockets,

Re: RFR: 8260428: Drop support for pre JDK 1.4 DatagramSocketImpl implementations

2021-10-12 Thread Daniel Fuchs
On Mon, 11 Oct 2021 09:42:12 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my changes (and CSR) to drop support for pre JDK > 1.4 `DatagramSocketImpl` implementations? > > These changes propose to drop support for `DatagramSocketImpls` that were > compiled with JDK 1.3

Re: RFR: 8260428: Drop support for pre JDK 1.4 DatagramSocketImpl implementations

2021-10-12 Thread Daniel Fuchs
On Mon, 11 Oct 2021 18:12:51 GMT, Alan Bateman wrote: >> Hi, >> >> Could someone please review my changes (and CSR) to drop support for pre JDK >> 1.4 `DatagramSocketImpl` implementations? >> >> These changes propose to drop support for `DatagramSocketImpls` that were >> compiled with JDK 1.3

Integrated: 8274894: Use Optional.empty() instead of ofNullable(null) in HttpResponse.BodySubscribers.discarding

2021-10-12 Thread Andrey Turbanov
On Wed, 18 Aug 2021 07:55:35 GMT, Andrey Turbanov wrote: > Usage of `Optional.ofNullable` is unnecessary when value is known. If it's > `null` value Optional.empty() should be preferred, as it doesn't perform > redundant `null` check. This pull request has now been integrated. Changeset: d04d

Re: RFR: 8275079: Remove unnecessary conversion to String in java.net.http

2021-10-12 Thread Daniel Fuchs
On Sat, 2 Oct 2021 20:05:37 GMT, Andrey Turbanov wrote: > Cleanup unnecessary String.valueOf calls (and similar) when conversion will > happen implicitly anyway LGTM Hi Andrey - I will sponsor this change. - Marked as reviewed by dfuchs (Reviewer). PR: https://git.openjdk.java.n

Re: RFR: 8245095: Implementation of JEP 408: Simple Web Server [v9]

2021-10-12 Thread Julia Boes
> This change implements a simple web server that can be run on the > command-line with `java -m jdk.httpserver`. > > This is facilitated by adding an entry point for the `jdk.httpserver` module, > an implementation class whose main method is run when the above command is > executed. This is th

Re: RFR: 8260428: Drop support for pre JDK 1.4 DatagramSocketImpl implementations

2021-10-12 Thread Vyom Tewari
On Mon, 11 Oct 2021 09:42:12 GMT, Patrick Concannon wrote: > Hi, > > Could someone please review my changes (and CSR) to drop support for pre JDK > 1.4 `DatagramSocketImpl` implementations? > > These changes propose to drop support for `DatagramSocketImpls` that were > compiled with JDK 1.3