Re: RFR: 8285452: Add a new test library API to replace a file content using FileUtils.java [v5]

2022-05-02 Thread Jaikiran Pai
On Mon, 2 May 2022 13:13:02 GMT, Weijun Wang wrote: >> `lines.remove()` and `lines.subList()` will throw the correct exception. >> Since you asked, we can add it. > > Now that we call `subList` at the beginning, I think there's no need to > explicitly perform a check. Hello Weijun, the change

Re: RFR: JDK-8266670: Better modeling of access flags in core reflection [v18]

2022-05-02 Thread Joe Darcy
> This is an early review of changes to better model JVM access flags, that is > "modifiers" like public, protected, etc. but explicitly at a VM level. > > Language level modifiers and JVM level access flags are closely related, but > distinct. There are concepts that overlap in the two domains

Integrated: 8285915: failure_handler: gather the contents of /etc/hosts file

2022-05-02 Thread Jaikiran Pai
On Fri, 29 Apr 2022 11:28:32 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which addresses > https://bugs.openjdk.java.net/browse/JDK-8285915? > > With this change, the environment details collected by the failure handler > will now include the contents of the

Re: RFR: 8285915: failure_handler: gather the contents of /etc/hosts file [v2]

2022-05-02 Thread Jaikiran Pai
On Mon, 2 May 2022 06:25:28 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses >> https://bugs.openjdk.java.net/browse/JDK-8285915? >> >> With this change, the environment details collected by the failure handler >> will now include the contents of the

Re: RFR: JDK-8285497: Add system property for Java SE specification maintenance version [v5]

2022-05-02 Thread Joe Darcy
On Mon, 2 May 2022 20:30:53 GMT, Joe Darcy wrote: >> @irisclark does raise an interesting point: If, say, MR 2 doesn’t require a >> change to the RI then the MR 1 RI is also the MR 2 RI, but its >> `java.specification.maintenance.version` property will report that it’s the >> MR 1 RI. >> >>

Re: RFR: JDK-8285977: Add links to IEEE 754 specification

2022-05-02 Thread Brian Burkhalter
On Mon, 2 May 2022 22:55:43 GMT, Joe Darcy wrote: > Please review the addition of @-see links from classes that mention the IEEE > 754 floating-point standard to an IEEE page about the standard. The URL in > the initial version of the PR is the top search result on the IEEE home page > for

Re: RFR: JDK-8285497: Add system property for Java SE specification maintenance version [v6]

2022-05-02 Thread Iris Clark
On Mon, 2 May 2022 20:31:18 GMT, Joe Darcy wrote: >> Add a new system property, java.specification.maintenance.version, to return >> the maintenance release number of the Java SE specification being >> implemented. The property is unset, optional in the terminology of >> System.getProperties,

Re: RFR: 8277090 : jsr166 refresh for jdk19 [v2]

2022-05-02 Thread Doug Lea
On Sun, 1 May 2022 14:35:28 GMT, Rémi Forax wrote: >> Doug Lea has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address review comments > > src/java.base/share/classes/java/util/concurrent/FutureTask.java line 222: > >> 220:

Re: RFR: JDK-8285977: Add links to IEEE 754 specification

2022-05-02 Thread Iris Clark
On Mon, 2 May 2022 22:55:43 GMT, Joe Darcy wrote: > Please review the addition of @-see links from classes that mention the IEEE > 754 floating-point standard to an IEEE page about the standard. The URL in > the initial version of the PR is the top search result on the IEEE home page > for

Re: RFR: JDK-8285977: Add links to IEEE 754 specification

2022-05-02 Thread Jonathan Gibbons
On Mon, 2 May 2022 22:55:43 GMT, Joe Darcy wrote: > Please review the addition of @-see links from classes that mention the IEEE > 754 floating-point standard to an IEEE page about the standard. The URL in > the initial version of the PR is the top search result on the IEEE home page > for

RFR: JDK-8285977: Add links to IEEE 754 specification

2022-05-02 Thread Joe Darcy
Please review the addition of @-see links from classes that mention the IEEE 754 floating-point standard to an IEEE page about the standard. The URL in the initial version of the PR is the top search result on the IEEE home page for "754 standard". Another candidate page to use is

Re: RFR: 8285517: System.getenv() returns unexpected value if environment variable has non ASCII character [v2]

2022-05-02 Thread Naoto Sato
On Sun, 1 May 2022 04:51:17 GMT, Ichiroh Takiguchi wrote: >> On JDK19 with Linux ja_JP.eucjp locale, >> System.getenv() returns unexpected value if environment variable has >> Japanese EUC characters. >> It seems this issue happens because of JEP 400. >> Arguments for ProcessBuilder have same

Re: RFR: 8285517: System.getenv() returns unexpected value if environment variable has non ASCII character [v2]

2022-05-02 Thread Naoto Sato
On Sun, 1 May 2022 04:47:09 GMT, Ichiroh Takiguchi wrote: >> test/jdk/java/lang/System/i18nEnvArg.java line 26: >> >>> 24: /* >>> 25: * @test >>> 26: * @bug 8285517 >> >> If the test should work only on a particular env, should describe here and >> add `@requires` tag. > > Add "@requires

Re: RFR: JDK-8285497: Add system property for Java SE specification maintenance version [v5]

2022-05-02 Thread Joe Darcy
On Fri, 29 Apr 2022 17:11:55 GMT, Mark Reinhold wrote: >> src/java.base/share/classes/java/lang/System.java line 743: >> >>> 741: * have the value {@code "1"}; after a second maintenance >>> 742: * release, this property will have the value {@code "2"}, >>> 743: *

Re: RFR: JDK-8285497: Add system property for Java SE specification maintenance version [v6]

2022-05-02 Thread Joe Darcy
> Add a new system property, java.specification.maintenance.version, to return > the maintenance release number of the Java SE specification being > implemented. The property is unset, optional in the terminology of > System.getProperties, for an initial release of a specification. > > Please

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-05-02 Thread Leonid Mesnik
On Fri, 29 Apr 2022 06:33:42 GMT, Serguei Spitsyn wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 7965cc6b168e567ac2596f2fbc3b00a7d99b7e1e > >

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-05-02 Thread Leonid Mesnik
On Fri, 29 Apr 2022 06:43:02 GMT, Serguei Spitsyn wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 7965cc6b168e567ac2596f2fbc3b00a7d99b7e1e > >

Re: RFR: 8285097: Duplicate XML keys in XPATHErrorResources.java and XSLTErrorResources.java [v2]

2022-05-02 Thread Joe Wang
On Fri, 29 Apr 2022 13:31:30 GMT, Shruthi wrote: >> Removing the Duplicate keys present in XSLTErrorResources.java and >> XPATHErrorResources.java >> >> The bug report for the same: https://bugs.openjdk.java.net/browse/JDK-8285097 > > Shruthi has updated the pull request incrementally with one

Re: RFR: 8282701: Use Class.getInterfaces(false) where possible to reduce allocation pressure

2022-05-02 Thread Claes Redestad
On Mon, 2 May 2022 16:19:07 GMT, Mandy Chung wrote: >> `Class.getInterfaces(false)` does not clone underlying array and can be used >> in cases when the returned array is only read from. > > For the `checkPackageAccess` case, I don't think it worths fixing; not only > that security manager is

Integrated: 8285745: Re-examine PushbackInputStream mark/reset

2022-05-02 Thread Brian Burkhalter
On Wed, 27 Apr 2022 20:10:03 GMT, Brian Burkhalter wrote: > Please review this request to remove the `synchronized` keyword from the > `mark(int)` and `reset()` methods of `java.io.PushbackInputStream`. This pull request has now been integrated. Changeset: 9d8c3bf9 Author:Brian Burkhalter

Re: RFR: 8285956: (fs) Excessive default poll interval in PollingWatchService

2022-05-02 Thread Brian Burkhalter
On Sat, 30 Apr 2022 00:14:29 GMT, Tyler Steele wrote: > PollingWatchService.java contains the WatchService and WatchKey > implementation for AIX and BSD. When a Path is >

Re: RFR: 8285947: Avoid redundant HashMap.containsKey calls in ZoneName

2022-05-02 Thread Roger Riggs
On Fri, 29 Apr 2022 06:31:22 GMT, Andrey Turbanov wrote: > `Map.containsKey` call is sometimes unnecessary, when it's known that Map > doesn't contain `null` values. > Instead we can just use Map.get and compare result with `null`. > I found one of such place, where Map.containsKey calls could

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-05-02 Thread Leonid Mesnik
On Fri, 29 Apr 2022 06:09:35 GMT, Serguei Spitsyn wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 7965cc6b168e567ac2596f2fbc3b00a7d99b7e1e > >

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-05-02 Thread Leonid Mesnik
On Fri, 29 Apr 2022 05:48:19 GMT, Serguei Spitsyn wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 7965cc6b168e567ac2596f2fbc3b00a7d99b7e1e > >

Re: RFR: 8285517: System.getenv() returns unexpected value if environment variable has non ASCII character [v2]

2022-05-02 Thread Ichiroh Takiguchi
On Mon, 2 May 2022 15:00:07 GMT, Roger Riggs wrote: >> Ichiroh Takiguchi has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8285517: System.getenv() returns unexpected value if environment variable >> has non ASCII character > > Can you

Re: RFR: 8282701: Use Class.getInterfaces(false) where possible to reduce allocation pressure

2022-05-02 Thread Mandy Chung
On Sat, 5 Mar 2022 13:07:56 GMT, Сергей Цыпанов wrote: > `Class.getInterfaces(false)` does not clone underlying array and can be used > in cases when the returned array is only read from. For the `checkPackageAccess` case, I don't think it worths fixing; not only that security manager is

Re: RFR: 8285947: Avoid redundant HashMap.containsKey calls in ZoneName

2022-05-02 Thread Naoto Sato
On Fri, 29 Apr 2022 06:31:22 GMT, Andrey Turbanov wrote: > `Map.containsKey` call is sometimes unnecessary, when it's known that Map > doesn't contain `null` values. > Instead we can just use Map.get and compare result with `null`. > I found one of such place, where Map.containsKey calls could

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v9]

2022-05-02 Thread Mikhailo Seledtsov
On Mon, 2 May 2022 06:24:21 GMT, Alan Bateman wrote: >> This is the implementation of JEP 425: Virtual Threads (Preview). >> >> We will refresh this PR periodically to pick up changes and fixes from the >> loom repo. >> >> Most of the new mechanisms in the HotSpot VM are disabled by default

Re: RFR: 8282701: Use Class.getInterfaces(false) where possible to reduce allocation pressure

2022-05-02 Thread Claes Redestad
On Sat, 5 Mar 2022 13:07:56 GMT, Сергей Цыпанов wrote: > `Class.getInterfaces(false)` does not clone underlying array and can be used > in cases when the returned array is only read from. I think this ok in general, but for consistency and to better call out that we're dealing with a trusted

Re: RFR: 8285517: System.getenv() returns unexpected value if environment variable has non ASCII character [v2]

2022-05-02 Thread Roger Riggs
On Sun, 1 May 2022 04:51:17 GMT, Ichiroh Takiguchi wrote: >> On JDK19 with Linux ja_JP.eucjp locale, >> System.getenv() returns unexpected value if environment variable has >> Japanese EUC characters. >> It seems this issue happens because of JEP 400. >> Arguments for ProcessBuilder have same

Re: RFR: 8285097: Duplicate XML keys in XPATHErrorResources.java and XSLTErrorResources.java [v2]

2022-05-02 Thread Tyler Steele
On Fri, 29 Apr 2022 13:31:30 GMT, Shruthi wrote: >> Removing the Duplicate keys present in XSLTErrorResources.java and >> XPATHErrorResources.java >> >> The bug report for the same: https://bugs.openjdk.java.net/browse/JDK-8285097 > > Shruthi has updated the pull request incrementally with one

Re: RFR: 8285097: Duplicate XML keys in XPATHErrorResources.java and XSLTErrorResources.java [v2]

2022-05-02 Thread Tyler Steele
On Mon, 2 May 2022 07:39:39 GMT, Shruthi wrote: >> Shruthi has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updating last modified tag and XRTreeFragSelectWrapper.java > > `/integrate` @shruacha1234 Please don't integrate without

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v8]

2022-05-02 Thread Lance Andersen
On Mon, 2 May 2022 12:32:25 GMT, Volker Simonis wrote: >> Add an API note to `InflaterInputStream::read(byte[] b, int off, int len)` >> to highlight that it might write more bytes than the returned number of >> inflated bytes into the buffer `b`. >> >> The superclass `java.io.InputStream`

Re: RFR: 8277090 : jsr166 refresh for jdk19 [v2]

2022-05-02 Thread Doug Lea
> This is the jsr166 refresh for jdk19. See > https://bugs.openjdk.java.net/browse/JDK-8285450 and > https://bugs.openjdk.java.net/browse/JDK-8277090 Doug Lea has updated the pull request incrementally with one additional commit since the last revision: Address review comments

Re: RFR: 8285452: Add a new test library API to replace a file content using FileUtils.java [v5]

2022-05-02 Thread Weijun Wang
On Fri, 29 Apr 2022 15:51:12 GMT, Weijun Wang wrote: >> test/lib/jdk/test/lib/util/FileUtils.java line 389: >> >>> 387: * @throws IOException >>> 388: */ >>> 389: public static void patch(Path path, int fromLine, int toLine, >>> String from, String to) throws IOException { >> >>

Re: RFR: 8285452: Add a new test library API to replace a file content using FileUtils.java [v9]

2022-05-02 Thread Weijun Wang
On Mon, 2 May 2022 13:01:40 GMT, Sibabrata Sahoo wrote: >> A new API to support replacing selective lines with desired content. > > Sibabrata Sahoo has updated the pull request incrementally with one > additional commit since the last revision: > > 8285452: Tests updated Marked as reviewed

Re: OpenJDK or SE Java Floating Point Options?

2022-05-02 Thread Raffaello Giulietti
>> May the Java Community Process reconsider the present floating point >> operations [...]? Over the past several weeks, this community has unanimously replied to your concerns with a clear: "No thanks, for the next decades we aren't interested in changing the current semantics of

Re: RFR: 8285915: failure_handler: gather the contents of /etc/hosts file [v2]

2022-05-02 Thread Erik Joelsson
On Mon, 2 May 2022 06:25:28 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses >> https://bugs.openjdk.java.net/browse/JDK-8285915? >> >> With this change, the environment details collected by the failure handler >> will now include the contents of the

Re: RFR: 8285452: Add a new test library API to replace a file content using FileUtils.java [v9]

2022-05-02 Thread Sibabrata Sahoo
> A new API to support replacing selective lines with desired content. Sibabrata Sahoo has updated the pull request incrementally with one additional commit since the last revision: 8285452: Tests updated - Changes: - all: https://git.openjdk.java.net/jdk/pull/8360/files -

Re: RFR: 8277090 : jsr166 refresh for jdk19

2022-05-02 Thread Doug Lea
On Mon, 2 May 2022 10:42:35 GMT, Rémi Forax wrote: >> Most AutoCloseables do not mention this in class-level javadocs. Is there a >> reason you think this one should? > > close() is now equivalent to the method shutdownAndAwaitTermination() shown > in the javadoc so i believe , replacing it

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v7]

2022-05-02 Thread Volker Simonis
On Wed, 13 Apr 2022 17:42:57 GMT, Volker Simonis wrote: >> Add an API note to `InflaterInputStream::read(byte[] b, int off, int len)` >> to highlight that it might write more bytes than the returned number of >> inflated bytes into the buffer `b`. >> >> The superclass `java.io.InputStream`

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v8]

2022-05-02 Thread Volker Simonis
> Add an API note to `InflaterInputStream::read(byte[] b, int off, int len)` to > highlight that it might write more bytes than the returned number of > inflated bytes into the buffer `b`. > > The superclass `java.io.InputStream` specifies that `read(byte[] b, int off, > int len)` will leave

Integrated: 8284435: Add dedicated filler objects for known dead Java heap areas

2022-05-02 Thread Thomas Schatzl
On Fri, 8 Apr 2022 08:13:33 GMT, Thomas Schatzl wrote: > Hi all, > > can I have reviews for this change that adds dedicated filler objects to > the VM? > > Currently, when formatting areas of dead objects all gcs use instances of > j.l.Object and int-arrays. > > This has the drawback of

Re: RFR: 8284435: Add dedicated filler objects for known dead Java heap areas [v3]

2022-05-02 Thread Thomas Schatzl
On Mon, 11 Apr 2022 14:55:32 GMT, Thomas Schatzl wrote: >> Hi all, >> >> can I have reviews for this change that adds dedicated filler objects to >> the VM? >> >> Currently, when formatting areas of dead objects all gcs use instances of >> j.l.Object and int-arrays. >> >> This has the

Re: RFR: 8284435: Add dedicated filler objects for known dead Java heap areas [v3]

2022-05-02 Thread Thomas Schatzl
On Fri, 29 Apr 2022 16:45:01 GMT, Ioi Lam wrote: >> Thomas Schatzl has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix test > > The latest version looks good to me. Thanks @iklam @walulyai for your reviews - PR:

Re: RFR: 8284435: Add dedicated filler objects for known dead Java heap areas [v3]

2022-05-02 Thread Ivan Walulya
On Mon, 11 Apr 2022 14:55:32 GMT, Thomas Schatzl wrote: >> Hi all, >> >> can I have reviews for this change that adds dedicated filler objects to >> the VM? >> >> Currently, when formatting areas of dead objects all gcs use instances of >> j.l.Object and int-arrays. >> >> This has the

Re: RFR: 8277090 : jsr166 refresh for jdk19

2022-05-02 Thread Rémi Forax
On Mon, 2 May 2022 10:23:01 GMT, Doug Lea wrote: >> src/java.base/share/classes/java/util/concurrent/ExecutorService.java line >> 138: >> >>> 136: * @author Doug Lea >>> 137: */ >>> 138: public interface ExecutorService extends Executor, AutoCloseable { >> >> The class documentation should

Re: RFR: 8277090 : jsr166 refresh for jdk19

2022-05-02 Thread Doug Lea
On Sun, 1 May 2022 14:37:43 GMT, Rémi Forax wrote: >> This is the jsr166 refresh for jdk19. See >> https://bugs.openjdk.java.net/browse/JDK-8285450 and >> https://bugs.openjdk.java.net/browse/JDK-8277090 > > src/java.base/share/classes/java/util/concurrent/ExecutorService.java line > 138: >

8285445: Would it make sense to add an java.nio.channels.FileChannel::nullFileChannel()

2022-05-02 Thread Patrick Reinhart
Hi Brian & Alan, I just run also into this issue and saw that that Alan suggested the use of OutputStream.nullOutputStream() that we implemented a while ago:

Re: RFR: 8282701: Use Class.getInterfaces(false) where possible to reduce allocation pressure

2022-05-02 Thread Сергей Цыпанов
On Sat, 5 Mar 2022 13:07:56 GMT, Сергей Цыпанов wrote: > `Class.getInterfaces(false)` does not clone underlying array and can be used > in cases when the returned array is only read from. Let's wait a bit - PR: https://git.openjdk.java.net/jdk/pull/7714

Re: RFR: 8285097: Duplicate XML keys in XPATHErrorResources.java and XSLTErrorResources.java [v2]

2022-05-02 Thread Shruthi
On Fri, 29 Apr 2022 13:31:30 GMT, Shruthi wrote: >> Removing the Duplicate keys present in XSLTErrorResources.java and >> XPATHErrorResources.java >> >> The bug report for the same: https://bugs.openjdk.java.net/browse/JDK-8285097 > > Shruthi has updated the pull request incrementally with one

Re: RFR: 8285452: Add a new test library API to replace a file content using FileUtils.java [v8]

2022-05-02 Thread Sibabrata Sahoo
> A new API to support replacing selective lines with desired content. Sibabrata Sahoo has updated the pull request incrementally with one additional commit since the last revision: 8285452: Tests updated - Changes: - all: https://git.openjdk.java.net/jdk/pull/8360/files -

OpenJDK or SE Java Floating Point Options?

2022-05-02 Thread sminervini.prism
To core-libs-dev, and Glavo, this inner nature of C++, simply means that the floating point equation can be altered in the decimal direction; the beginning of value degredation could be altered in the equation to be entirely outside number type's the range. C++'s "apparent floating point" and

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-05-02 Thread Alan Bateman
On Fri, 29 Apr 2022 23:14:45 GMT, Mikhailo Seledtsov wrote: >> Alan Bateman has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refresh 7965cc6b168e567ac2596f2fbc3b00a7d99b7e1e > > test/lib/jdk/test/lib/thread/VThreadRunner.java line 61: >

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v8]

2022-05-02 Thread Alan Bateman
On Fri, 29 Apr 2022 20:57:01 GMT, Erik Gahlin wrote: >> test/jdk/jdk/jfr/api/consumer/TestManyRecordings.java line 57: >> >>> 55: int classLoaderCount = Integer.parseInt(args[0]); >>> 56: int classCount = Integer.parseInt(args[1]); >>> 57: for (int i = 0; i > >> Did you

Re: RFR: 8285915: failure_handler: gather the contents of /etc/hosts file

2022-05-02 Thread Jaikiran Pai
On Fri, 29 Apr 2022 11:28:32 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which addresses > https://bugs.openjdk.java.net/browse/JDK-8285915? > > With this change, the environment details collected by the failure handler > will now include the contents of the

Re: RFR: 8285915: failure_handler: gather the contents of /etc/hosts file [v2]

2022-05-02 Thread Jaikiran Pai
> Can I please get a review of this change which addresses > https://bugs.openjdk.java.net/browse/JDK-8285915? > > With this change, the environment details collected by the failure handler > will now include the contents of the `/etc/hosts/` file, which can be useful > in certain cases when

Re: RFR: 8284161: Implementation of Virtual Threads (Preview) [v9]

2022-05-02 Thread Alan Bateman
> This is the implementation of JEP 425: Virtual Threads (Preview). > > We will refresh this PR periodically to pick up changes and fixes from the > loom repo. > > Most of the new mechanisms in the HotSpot VM are disabled by default and > require running with `--enable-preview` to enable. > >