Re: RFR: 8247373: ArraysSupport.newLength doc, test, and exception message

2020-12-03 Thread Stuart Marks
Hi Martin, I'd appreciate it if you could take a look at this. Thanks, s'marks On 12/3/20 10:57 PM, Stuart Marks wrote: This rewrites the doc of ArraysSupport.newLength, adds detail to the exception message, and adds a test. In addition to some renaming and a bit of refactoring of the actu

RFR: 8247373: ArraysSupport.newLength doc, test, and exception message

2020-12-03 Thread Stuart Marks
This rewrites the doc of ArraysSupport.newLength, adds detail to the exception message, and adds a test. In addition to some renaming and a bit of refactoring of the actual code, I also made two changes of substance to the code: 1. I fixed a problem with overflow checking. In the original code,

Re: RFR: 8256167: Convert JDK use of `Reference::get` to `Reference::refersTo`

2020-12-03 Thread Serguei Spitsyn
On Thu, 3 Dec 2020 22:54:54 GMT, Mandy Chung wrote: > This patch replaces some uses of `Reference::get` to `Reference::refersTo` to > avoid keeping a referent strongly reachable that could cause unnecessary > delay in collecting such object. I only made change in some but not all > classes i

Re: RFR: 8256515: javax.xml.XMLEventReader produces incorrect START_DOCUMENT event

2020-12-03 Thread Joe Wang
On Thu, 3 Dec 2020 14:44:05 GMT, Marius Volkhart wrote: >> @MariusVolkhart Here is a PR for your branch so the test works with jtreg: >> https://github.com/MariusVolkhart/jdk/pull/1 >> >> Fails before the JDK patch and passes after. >> >> Run it with: >> $ rm -rf JTwork JTreport && jtreg >> -

Re: RFR: 8166026: Refactor java/lang shell tests to java [v2]

2020-12-03 Thread Roger Riggs
On Thu, 3 Dec 2020 23:07:25 GMT, Ivan Šipka wrote: >> Ivan Šipka has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8166026: Refactor java/lang shell tests to java > > test/jdk/java/lang/Thread/UncaughtExceptionsTest.java line 94: > >> 92:

Re: RFR: 8166026: Refactor java/lang shell tests to java [v2]

2020-12-03 Thread Ivan Šipka
On Thu, 3 Dec 2020 19:37:11 GMT, Ivan Šipka wrote: >> Refactor `test/jdk/java/lang/Thread/UncaughtExceptions.sh` as java test. > > Ivan Šipka has updated the pull request incrementally with one additional > commit since the last revision: > > 8166026: Refactor java/lang shell tests to java >

RFR: 8256167: Convert JDK use of `Reference::get` to `Reference::refersTo`

2020-12-03 Thread Mandy Chung
This patch replaces some uses of `Reference::get` to `Reference::refersTo` to avoid keeping a referent strongly reachable that could cause unnecessary delay in collecting such object. I only made change in some but not all classes in core libraries when working with Kim on `Reference::refersTo

Re: RFR: 8256894: define test groups [v3]

2020-12-03 Thread Ivan Šipka
> Defined new test groups as defined in ticket. @fguallini Ivan Šipka has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since t

Integrated: 8235784: java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java fails due to timeout with fastdebug bits

2020-12-03 Thread Mandy Chung
On Thu, 3 Dec 2020 19:10:46 GMT, Mandy Chung wrote: > VarHandleTestByteArrayAsInt.java intermittently fails only fastdebug build > and slow mac os machines. I can't reproduce this locally. It fails on jdk > 16 internal testing on a few builds. I propose to increase the timeout and > see if

Re: RFR: 8235784: java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java fails due to timeout with fastdebug bits

2020-12-03 Thread Naoto Sato
On Thu, 3 Dec 2020 19:10:46 GMT, Mandy Chung wrote: > VarHandleTestByteArrayAsInt.java intermittently fails only fastdebug build > and slow mac os machines. I can't reproduce this locally. It fails on jdk > 16 internal testing on a few builds. I propose to increase the timeout and > see if

Re: RFR: 8235784: java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java fails due to timeout with fastdebug bits

2020-12-03 Thread Brent Christian
On Thu, 3 Dec 2020 19:10:46 GMT, Mandy Chung wrote: > VarHandleTestByteArrayAsInt.java intermittently fails only fastdebug build > and slow mac os machines. I can't reproduce this locally. It fails on jdk > 16 internal testing on a few builds. I propose to increase the timeout and > see if

Re: RFR: 8166026: Refactor java/lang shell tests to java [v2]

2020-12-03 Thread Roger Riggs
On Thu, 3 Dec 2020 19:33:14 GMT, Ivan Šipka wrote: >> Refactor `test/jdk/java/lang/annotation/loaderLeak/LoaderLeak.sh` as java >> test. > > Ivan Šipka has updated the pull request incrementally with one additional > commit since the last revision: > > 8166026: Refactor java/lang shell tests

Re: RFR: 8166026: Refactor java/lang shell tests to java [v2]

2020-12-03 Thread Roger Riggs
On Thu, 3 Dec 2020 19:37:11 GMT, Ivan Šipka wrote: >> Refactor `test/jdk/java/lang/Thread/UncaughtExceptions.sh` as java test. > > Ivan Šipka has updated the pull request incrementally with one additional > commit since the last revision: > > 8166026: Refactor java/lang shell tests to java P

Re: RFR: 8166026: refactor shell tests to java [v3]

2020-12-03 Thread Roger Riggs
On Thu, 3 Dec 2020 19:46:14 GMT, Ivan Šipka wrote: >> @iignatev could you please review? Thank you. >> >> note to self: >> jtreg test/jdk/java/lang/ProcessBuilder/InheritIO/InheritIoTest.java >> test/jdk/java/lang/SecurityManager/modules/CustomSecurityManagerTest.java >> test/jdk/java/lang/Th

Re: RFR: 8247402: Documentation for Map::compute contains confusing implementation requirements

2020-12-03 Thread Stuart Marks
On Sat, 28 Nov 2020 08:42:52 GMT, John Lin wrote: >> @johnlinp In any case, you'd also need to update the surrounding prose; we >> need to remove this: >> returning the current value or {@code null} if absent:``` > > @pavelrappo Please see my updated CSR below. Thanks. > > # Map::compute shou

Re: RFR: 8247402: Documentation for Map::compute contains confusing implementation requirements

2020-12-03 Thread Stuart Marks
On Mon, 30 Nov 2020 15:08:51 GMT, Pavel Rappo wrote: >> @johnlinp, thanks for updating the CSR draft; it is much better now. >> >> @stuart-marks, I think we could further improve this snippet. This `if` >> statement seems to use an optimization: >> >> if (oldValue != null || map.containsKey(ke

Re: RFR: 8166026: refactor shell tests to java [v3]

2020-12-03 Thread Ivan Šipka
> @iignatev could you please review? Thank you. > > note to self: > jtreg test/jdk/java/lang/ProcessBuilder/InheritIO/InheritIoTest.java > test/jdk/java/lang/SecurityManager/modules/CustomSecurityManagerTest.java > test/jdk/java/lang/Thread/uncaughtexceptions/UncaughtExceptionsTest.java > test

Re: RFR: 8166026: Refactor java/lang shell tests to java [v2]

2020-12-03 Thread Ivan Šipka
> Refactor `test/jdk/java/lang/Thread/UncaughtExceptions.sh` as java test. Ivan Šipka has updated the pull request incrementally with one additional commit since the last revision: 8166026: Refactor java/lang shell tests to java - Changes: - all: https://git.openjdk.java.net/jd

Integrated: 8228615: Optional.empty doc should suggest using isEmpty

2020-12-03 Thread Stuart Marks
On Thu, 3 Dec 2020 01:08:18 GMT, Stuart Marks wrote: > Some small doc changes. The changes are to `@apiNote` text, which is > non-normative, so no CSR is required. This pull request has now been integrated. Changeset: 2b73f992 Author:Stuart Marks URL: https://git.openjdk.java.net/jd

Re: RFR: 8166026: Refactor java/lang shell tests to java [v2]

2020-12-03 Thread Ivan Šipka
> Refactor `test/jdk/java/lang/annotation/loaderLeak/LoaderLeak.sh` as java > test. Ivan Šipka has updated the pull request incrementally with one additional commit since the last revision: 8166026: Refactor java/lang shell tests to java - Changes: - all: https://git.openjdk.j

Re: RFR: 8166026: Refactor java/lang shell tests to java [v2]

2020-12-03 Thread Ivan Šipka
> Refactor > `test/jdk/java/lang/SecurityManager/modules/CustomSecurityManager.sh` as java > test. Ivan Šipka has updated the pull request incrementally with two additional commits since the last revision: - 8166026: Refactor java/lang shell tests to java - 8166026: Refactor java/lang shell

RFR: 8235784: java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java fails due to timeout with fastdebug bits

2020-12-03 Thread Mandy Chung
VarHandleTestByteArrayAsInt.java intermittently fails only fastdebug build and slow mac os machines. I can't reproduce this locally. It fails on jdk 16 internal testing on a few builds. I propose to increase the timeout and see if that is adequate or not. We will re-examine this test if the

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v3]

2020-12-03 Thread Mandy Chung
On Wed, 2 Dec 2020 14:40:15 GMT, Jan Lahoda wrote: >> This pull request replaces https://github.com/openjdk/jdk/pull/1227. >> >> From the original PR: >> >>> Please review the code for the second iteration of sealed classes. In this >>> iteration we are: >>> >>> * Enhancing narrowing refe

Re: RFR: 8255542: Attribute length of Module, ModulePackages and other attributes is ignored [v2]

2020-12-03 Thread Mandy Chung
On Thu, 3 Dec 2020 09:58:16 GMT, Alan Bateman wrote: >> The attribute_length of known Module attributes in the module-info.class >> is currently ignored. It should be checked and the class rejected if the >> attribute length doesn't exactly match the length of the info in the >> attribute.

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v3]

2020-12-03 Thread Mandy Chung
On Thu, 3 Dec 2020 16:07:28 GMT, Lois Foltan wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improving Class.getPermittedSubclasses to filter out permitted classes >> that are not a subtype of the current class, and

Re: RFR: 8257622: MemoryAccess methods are missing @ForceInline annotations

2020-12-03 Thread Aleksey Shipilev
On Wed, 2 Dec 2020 18:47:10 GMT, Maurizio Cimadamore wrote: > The accessor methods in the `MemoryAccess` class are missing `@ForceInline` > annotations. This causes odd behavior on certain benchmarks, especially if > these methods are called many times in the body of a single method. Looks go

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v3]

2020-12-03 Thread Lois Foltan
On Wed, 2 Dec 2020 14:40:15 GMT, Jan Lahoda wrote: >> This pull request replaces https://github.com/openjdk/jdk/pull/1227. >> >> From the original PR: >> >>> Please review the code for the second iteration of sealed classes. In this >>> iteration we are: >>> >>> * Enhancing narrowing refe

Re: RFR: 8255542: Attribute length of Module, ModulePackages and other attributes is ignored [v2]

2020-12-03 Thread Rémi Forax
On Thu, 3 Dec 2020 15:52:35 GMT, Daniel Fuchs wrote: >> src/java.base/share/classes/jdk/internal/module/ModuleInfo.java line 1203: >> >>> 1201: @Override >>> 1202: public String readUTF() throws IOException { >>> 1203: return DataInputStream.readUTF(this); >> >> If i

Re: RFR: 8255542: Attribute length of Module, ModulePackages and other attributes is ignored [v2]

2020-12-03 Thread Alan Bateman
On Thu, 3 Dec 2020 15:55:15 GMT, Rémi Forax wrote: >> Hi Rémi, I do not think that that is required. `DataInputStream.readUTF` >> will call back into `this` to do the reading so the `count` should be >> properly incremented? Or maybe I'm missing something. Best regards! > > Thanks, > i should

Re: RFR: 8255542: Attribute length of Module, ModulePackages and other attributes is ignored [v2]

2020-12-03 Thread Daniel Fuchs
On Thu, 3 Dec 2020 12:50:56 GMT, Rémi Forax wrote: >> Alan Bateman 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 11 additional >> commits sin

Integrated: 8257591: Remove suppression of record preview related warnings in java.lang

2020-12-03 Thread Julia Boes
On Thu, 3 Dec 2020 10:39:05 GMT, Julia Boes wrote: > Records exit preview in JDK 16. This change removes preview related > suppression warnings in some source files and removes the '--enable-preview' > option for compilation and execution of some tests that use record classes. This pull reques

Integrated: 8255845: Memory leak in imageFile.cpp

2020-12-03 Thread Evan Whelan
On Thu, 3 Dec 2020 14:57:16 GMT, Evan Whelan wrote: > This is a straightforward fix to resolve a potential memory leak in > imageFile.cpp. > > If `find_location` returns true, the `path` char array is never released. > > This has been fixed This pull request has now been integrated. Changese

Re: RFR: 8255845: Memory leak in imageFile.cpp

2020-12-03 Thread Athijegannathan Sundararajan
On Thu, 3 Dec 2020 14:57:16 GMT, Evan Whelan wrote: > This is a straightforward fix to resolve a potential memory leak in > imageFile.cpp. > > If `find_location` returns true, the `path` char array is never released. > > This has been fixed Marked as reviewed by sundar (Reviewer). --

Re: RFR: 8255845: Memory leak in imageFile.cpp

2020-12-03 Thread Jim Laskey
On Thu, 3 Dec 2020 14:57:16 GMT, Evan Whelan wrote: > This is a straightforward fix to resolve a potential memory leak in > imageFile.cpp. > > If `find_location` returns true, the `path` char array is never released. > > This has been fixed Marked as reviewed by jlaskey (Reviewer). -

RFR: 8255845: Memory leak in imageFile.cpp

2020-12-03 Thread Evan Whelan
This is a straightforward fix to resolve a potential memory leak in imageFile.cpp. If `find_location` returns true, the `path` char array is never released. This has been fixed - Commit messages: - 8255845: Memory leak in imageFile.cpp Changes: https://git.openjdk.java.net/jdk/pu

Re: RFR: 8256515: javax.xml.XMLEventReader produces incorrect START_DOCUMENT event

2020-12-03 Thread Marius Volkhart
On Fri, 20 Nov 2020 11:41:53 GMT, Severin Gehwolf wrote: >> Thanks @jerboaa >> >> I have a JBS number now: >> [8256515](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8256515). >> Since opening the PR I've learned that I've gone about the process >> backwards, and should have found

Re: RFR: 8256515: javax.xml.XMLEventReader produces incorrect START_DOCUMENT event

2020-12-03 Thread Joe Wang
On Thu, 19 Nov 2020 16:34:36 GMT, Marius Volkhart wrote: >> @MariusVolkhart I'll work with you getting the fix in and get the test >> running using jtreg. Give me a few moments to reproduce. > > Thanks @jerboaa > > I have a JBS number now: > [8256515](https://bugs.java.com/bugdatabase/view_b

Re: RFR: 8256515: javax.xml.XMLEventReader produces incorrect START_DOCUMENT event

2020-12-03 Thread Marius Volkhart
On Wed, 4 Nov 2020 14:01:53 GMT, Marius Volkhart wrote: > The default implementation of javax.xml.stream.XMLEventReader produced a > StartDocument event that always indicated that the "standalone" attribute was > set. > > The root cause of this was that the > com.sun.xml.internal.stream.even

Re: RFR: 8256515: javax.xml.XMLEventReader produces incorrect START_DOCUMENT event

2020-12-03 Thread Severin Gehwolf
On Thu, 19 Nov 2020 16:34:36 GMT, Marius Volkhart wrote: >> @MariusVolkhart I'll work with you getting the fix in and get the test >> running using jtreg. Give me a few moments to reproduce. > > Thanks @jerboaa > > I have a JBS number now: > [8256515](https://bugs.java.com/bugdatabase/view_b

Re: RFR: 8256515: javax.xml.XMLEventReader produces incorrect START_DOCUMENT event

2020-12-03 Thread Marius Volkhart
On Wed, 18 Nov 2020 09:42:49 GMT, Severin Gehwolf wrote: >> The default implementation of javax.xml.stream.XMLEventReader produced a >> StartDocument event that always indicated that the "standalone" attribute >> was set. >> >> The root cause of this was that the >> com.sun.xml.internal.strea

RFR: 8256515: javax.xml.XMLEventReader produces incorrect START_DOCUMENT event

2020-12-03 Thread Marius Volkhart
The default implementation of javax.xml.stream.XMLEventReader produced a StartDocument event that always indicated that the "standalone" attribute was set. The root cause of this was that the com.sun.xml.internal.stream.events.XMLEventAllocatorImpl always set the "standalone" attribute, rather

Re: RFR: 8256515: javax.xml.XMLEventReader produces incorrect START_DOCUMENT event

2020-12-03 Thread Severin Gehwolf
On Wed, 4 Nov 2020 14:01:53 GMT, Marius Volkhart wrote: > The default implementation of javax.xml.stream.XMLEventReader produced a > StartDocument event that always indicated that the "standalone" attribute was > set. > > The root cause of this was that the > com.sun.xml.internal.stream.even

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview)

2020-12-03 Thread Jan Lahoda
On Thu, 3 Dec 2020 14:08:48 GMT, Jan Lahoda wrote: >>> I suggest `Class::getPermittedSubclasses` to return a `non-null` array if >>> this `Class` is sealed, i.e. this class is derived from a `class` file with >>> the presence of `PermittedSubclasses` attribute regardless of its content >>> (th

Re: RFR: 8166026: Refactor java/lang shell tests to java

2020-12-03 Thread Sean Mullan
On Wed, 2 Dec 2020 20:45:11 GMT, Ivan Šipka wrote: > Refactor > `test/jdk/java/lang/SecurityManager/modules/CustomSecurityManager.sh` as java > test. Marked as reviewed by mullan (Reviewer). test/jdk/java/lang/SecurityManager/modules/CustomSecurityManagerTest.java line 2: > 1: /* > 2: * Co

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview)

2020-12-03 Thread Jan Lahoda
On Wed, 2 Dec 2020 19:31:59 GMT, Dan Smith wrote: >>> Additional changes may be needed to Class.permittedSubclasses() and/or >>> Class.isSealed() as part of fixing bug JDK-8256867. The JVM is being >>> changed to treat classes with empty PermittedSubclasses attributes as >>> sealed classes tha

Re: RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v4]

2020-12-03 Thread Jan Lahoda
> This pull request replaces https://github.com/openjdk/jdk/pull/1227. > > From the original PR: > >> Please review the code for the second iteration of sealed classes. In this >> iteration we are: >> >> * Enhancing narrowing reference conversion to allow for stricter >> checking of cast c

Re: RFR: 8255542: Attribute length of Module, ModulePackages and other attributes is ignored [v2]

2020-12-03 Thread Rémi Forax
On Thu, 3 Dec 2020 09:58:16 GMT, Alan Bateman wrote: >> The attribute_length of known Module attributes in the module-info.class >> is currently ignored. It should be checked and the class rejected if the >> attribute length doesn't exactly match the length of the info in the >> attribute.

Re: RFR: 8255542: Attribute length of Module, ModulePackages and other attributes is ignored [v2]

2020-12-03 Thread Chris Hegarty
On Thu, 3 Dec 2020 09:58:16 GMT, Alan Bateman wrote: >> The attribute_length of known Module attributes in the module-info.class >> is currently ignored. It should be checked and the class rejected if the >> attribute length doesn't exactly match the length of the info in the >> attribute.

Re: RFR: 8257591: Remove suppression of record preview related warnings in java.lang

2020-12-03 Thread Chris Hegarty
On Thu, 3 Dec 2020 10:39:05 GMT, Julia Boes wrote: > Records exit preview in JDK 16. This change removes preview related > suppression warnings in some source files and removes the '--enable-preview' > option for compilation and execution of some tests that use record classes. Marked as review

RFR: 8257591: Remove suppression of record preview related warnings in java.lang

2020-12-03 Thread Julia Boes
Records exit preview in JDK 16. This change removes preview related suppression warnings in some source files and removes the '--enable-preview' option for compilation and execution of some tests that use record classes. - Commit messages: - remove --enable-preview in tests - remo

Re: RFR: 8255542: Attribute length of Module, ModulePackages and other attributes is ignored [v2]

2020-12-03 Thread Daniel Fuchs
On Thu, 3 Dec 2020 09:58:16 GMT, Alan Bateman wrote: >> The attribute_length of known Module attributes in the module-info.class >> is currently ignored. It should be checked and the class rejected if the >> attribute length doesn't exactly match the length of the info in the >> attribute.

Re: RFR: 8255542: Attribute length of Module, ModulePackages and other attributes is ignored [v2]

2020-12-03 Thread Alan Bateman
> The attribute_length of known Module attributes in the module-info.class > is currently ignored. It should be checked and the class rejected if the > attribute length doesn't exactly match the length of the info in the > attribute. > > There are several ways to fix this. I initially limit

Re: RFR: JDK-8256950: Add record attribute support to symbol generator CreateSymbols [v3]

2020-12-03 Thread Jan Lahoda
On Tue, 1 Dec 2020 12:06:25 GMT, Jan Lahoda wrote: >> test/langtools/tools/javac/platform/createsymbols/CreateSymbolsTestImpl.java >> line 513: >> >>> 511: public java.util.List >>> l(); >>> 512:} >>> 513:""",

Re: RFR: JDK-8256950: Add record attribute support to symbol generator CreateSymbols [v5]

2020-12-03 Thread Jan Lahoda
> Adding support for record classes in the historical data for ct.sym. This > includes a few changes not strictly needed for the change: > -updating and moving tests into test/langtools, so that it is easier to run > them. > -fixing Record attribute reading in javac's ClassReader (used for tests,