Re: RFR: 8038146: Clarify NavigableMap/TreeMap support for Entry.setValue [v2]

2023-01-13 Thread Stuart Marks
> Also additional verbiage regarding Map.Entry objects in general and their > possible connection to an underlying Map. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Updates from Alan. - Changes: - all:

Re: RFR: 8038146: Clarify NavigableMap/TreeMap support for Entry.setValue

2023-01-13 Thread Stuart Marks
On Fri, 13 Jan 2023 15:04:21 GMT, Alan Bateman wrote: >> Also additional verbiage regarding Map.Entry objects in general and their >> possible connection to an underlying Map. > > src/java.base/share/classes/java/util/Map.java line 421: > >> 419: * {@link Set#toArray toArray} overloads,

Re: RFR: 8038146: Clarify NavigableMap/TreeMap support for Entry.setValue

2023-01-13 Thread Stuart Marks
On Fri, 13 Jan 2023 15:02:00 GMT, Alan Bateman wrote: >> Also additional verbiage regarding Map.Entry objects in general and their >> possible connection to an underlying Map. > > src/java.base/share/classes/java/util/Map.java line 405: > >> 403: * {@link Iterator} or implicitly via the

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v7]

2023-01-13 Thread Archie L . Cobbs
On Fri, 13 Jan 2023 00:57:14 GMT, Archie L. Cobbs wrote: >> Ok - I thought false negative was the thing to absolutely avoid - and that >> was the no. 1 concern. I think a possible approach to keep both the >> filtering and the code more or less similar to what you have, is to save the >> type

[jdk20] Integrated: 8299502: Usage of constructors of primitive wrapper classes should be avoided in javax.xml API docs

2023-01-13 Thread Justin Lu
On Fri, 13 Jan 2023 22:00:37 GMT, Justin Lu wrote: > This pull request contains a backport of commit > [b8852f65](https://github.com/openjdk/jdk/commit/b8852f65a0adcb9ee5693bb6727a0668aa9808bf) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit being backported

[jdk20] Integrated: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs

2023-01-13 Thread Justin Lu
On Fri, 13 Jan 2023 21:53:50 GMT, Justin Lu wrote: > This pull request contains a backport of commit > [cd10c727](https://github.com/openjdk/jdk/commit/cd10c7278d8fcf7ce6713a3ee688bb1e10c024f6) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit being backported

[jdk20] Integrated: 8299501: Usage of constructors of primitive wrapper classes should be avoided in java.util API docs

2023-01-13 Thread Justin Lu
On Fri, 13 Jan 2023 21:50:15 GMT, Justin Lu wrote: > This pull request contains a backport of commit > [f36f1354](https://github.com/openjdk/jdk/commit/f36f1354c63a500c70ae51a9c2b2d21ad55cfa77) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit being backported

[jdk20] Integrated: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs

2023-01-13 Thread Justin Lu
On Fri, 13 Jan 2023 21:44:55 GMT, Justin Lu wrote: > This pull request contains a backport of commit > [d663b5da](https://github.com/openjdk/jdk/commit/d663b5da10be1f3f33a2729e4b3605fb5e13b4d6) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit being backported

Re: RFR: 8300140: ZipFile.isSignatureRelated returns true for files in META-INF subdirectories

2023-01-13 Thread Weijun Wang
On Thu, 12 Jan 2023 18:44:26 GMT, Eirik Bjorsnos wrote: > Some call sites of SignatureFileVerifier.isBlockOrSF fails to check that > files reside in META-INF directly, and not in a subdirectory of META-INF. > > The mentioned call sites needs updates to check and ignore such files. > > A new

[jdk20] Integrated: 8300141: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java with ZGC

2023-01-13 Thread Daniel D . Daugherty
On Fri, 13 Jan 2023 21:25:54 GMT, Daniel D. Daugherty wrote: > Trivial fixes to ProblemList some tests: > [JDK-8300141](https://bugs.openjdk.org/browse/JDK-8300141) ProblemList > java/util/concurrent/locks/Lock/OOMEInAQS.java with ZGC >

Re: [jdk20] Integrated: 8300141: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java with ZGC

2023-01-13 Thread Daniel D . Daugherty
On Fri, 13 Jan 2023 22:43:09 GMT, Mikael Vidstedt wrote: >> Trivial fixes to ProblemList some tests: >> [JDK-8300141](https://bugs.openjdk.org/browse/JDK-8300141) ProblemList >> java/util/concurrent/locks/Lock/OOMEInAQS.java with ZGC >> [JDK-8300144](https://bugs.openjdk.org/browse/JDK-8300144)

Re: [jdk20] Integrated: 8300141: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java with ZGC

2023-01-13 Thread Mikael Vidstedt
On Fri, 13 Jan 2023 21:25:54 GMT, Daniel D. Daugherty wrote: > Trivial fixes to ProblemList some tests: > [JDK-8300141](https://bugs.openjdk.org/browse/JDK-8300141) ProblemList > java/util/concurrent/locks/Lock/OOMEInAQS.java with ZGC >

[jdk20] Integrated: 8300141: ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java with ZGC

2023-01-13 Thread Daniel D . Daugherty
Trivial fixes to ProblemList some tests: [JDK-8300141](https://bugs.openjdk.org/browse/JDK-8300141) ProblemList java/util/concurrent/locks/Lock/OOMEInAQS.java with ZGC [JDK-8300144](https://bugs.openjdk.org/browse/JDK-8300144) ProblemList

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2]

2023-01-13 Thread Joe Darcy
On Fri, 13 Jan 2023 22:38:32 GMT, Naoto Sato wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo found in code review. > > src/java.base/share/classes/java/util/ResourceBundle.java line 270: > >> 268: * are

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2]

2023-01-13 Thread Naoto Sato
On Fri, 13 Jan 2023 22:50:53 GMT, Joe Darcy wrote: >> With generalized see and link tags that can refer to anchors (JDK-8200337), >> the see and link tags in core libraries should be updated to use this >> feature when possible. This PR covers such updates for java.base. > > Joe Darcy has

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2]

2023-01-13 Thread Mandy Chung
On Fri, 13 Jan 2023 22:50:53 GMT, Joe Darcy wrote: >> With generalized see and link tags that can refer to anchors (JDK-8200337), >> the see and link tags in core libraries should be updated to use this >> feature when possible. This PR covers such updates for java.base. > > Joe Darcy has

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs [v2]

2023-01-13 Thread Joe Darcy
> With generalized see and link tags that can refer to anchors (JDK-8200337), > the see and link tags in core libraries should be updated to use this feature > when possible. This PR covers such updates for java.base. Joe Darcy has updated the pull request incrementally with one additional

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v10]

2023-01-13 Thread Archie L . Cobbs
> This PR adds a new lint warning category `this-escape`. > > It also adds `@SuppressWarnings` annotations as needed to the JDK itself to > allow the JDK to continue to compile with `-Xlint:all`. > > A 'this' escape warning is generated for a constructor `A()` in a class `A` > when the

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs

2023-01-13 Thread Mandy Chung
On Fri, 13 Jan 2023 21:30:06 GMT, Joe Darcy wrote: > With generalized see and link tags that can refer to anchors (JDK-8200337), > the see and link tags in core libraries should be updated to use this feature > when possible. This PR covers such updates for java.base.

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs

2023-01-13 Thread Naoto Sato
On Fri, 13 Jan 2023 21:30:06 GMT, Joe Darcy wrote: > With generalized see and link tags that can refer to anchors (JDK-8200337), > the see and link tags in core libraries should be updated to use this feature > when possible. This PR covers such updates for java.base.

Re: RFR: JDK-8300133: Use generalized see and link tags in core libs

2023-01-13 Thread Jonathan Gibbons
On Fri, 13 Jan 2023 21:30:06 GMT, Joe Darcy wrote: > With generalized see and link tags that can refer to anchors (JDK-8200337), > the see and link tags in core libraries should be updated to use this feature > when possible. This PR covers such updates for java.base. Nice to see all those

Re: [jdk20] RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs

2023-01-13 Thread Iris Clark
On Fri, 13 Jan 2023 21:53:50 GMT, Justin Lu wrote: > This pull request contains a backport of commit > [cd10c727](https://github.com/openjdk/jdk/commit/cd10c7278d8fcf7ce6713a3ee688bb1e10c024f6) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. > > The commit being backported

[jdk20] RFR: 8299502: Usage of constructors of primitive wrapper classes should be avoided in javax.xml API docs

2023-01-13 Thread Justin Lu
This pull request contains a backport of commit [b8852f65](https://github.com/openjdk/jdk/commit/b8852f65a0adcb9ee5693bb6727a0668aa9808bf) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Justin Lu on 9 Jan 2023 and was reviewed by Joe

Re: RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat

2023-01-13 Thread Iris Clark
On Fri, 13 Jan 2023 21:47:40 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for > [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). > > Code examples using ... blocks

[jdk20] RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs

2023-01-13 Thread Justin Lu
This pull request contains a backport of commit [cd10c727](https://github.com/openjdk/jdk/commit/cd10c7278d8fcf7ce6713a3ee688bb1e10c024f6) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Justin Lu on 9 Jan 2023 and was reviewed by

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v8]

2023-01-13 Thread Vicente Romero
On Fri, 13 Jan 2023 21:33:02 GMT, Archie L. Cobbs wrote: >> Sounds good - thanks. > > Ah. I just realized that we need to do it your way because of the following > bug: > > Suppose you have a constructor and a field with initializer that both leak, > but you have

[jdk20] RFR: 8299501: Usage of constructors of primitive wrapper classes should be avoided in java.util API docs

2023-01-13 Thread Justin Lu
This pull request contains a backport of commit [f36f1354](https://github.com/openjdk/jdk/commit/f36f1354c63a500c70ae51a9c2b2d21ad55cfa77) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Justin Lu on 9 Jan 2023 and was reviewed by

RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat

2023-01-13 Thread Justin Lu
This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html). Code examples using ... blocks are replaced with the @ snippet syntax where applicable.

[jdk20] RFR: 8299498: Usage of constructors of primitive wrapper classes should be avoided in java.lang API docs

2023-01-13 Thread Justin Lu
This pull request contains a backport of commit [d663b5da](https://github.com/openjdk/jdk/commit/d663b5da10be1f3f33a2729e4b3605fb5e13b4d6) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Justin Lu on 11 Jan 2023 and was reviewed by

RFR: JDK-8300133: Use generalized see and link tags in core libs

2023-01-13 Thread Joe Darcy
With generalized see and link tags that can refer to anchors (JDK-8200337), the see and link tags in core libraries should be updated to use this feature when possible. This PR covers such updates for java.base. - Commit messages: - JDK-8300133: Use generalized see and link tags

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v8]

2023-01-13 Thread Archie L . Cobbs
On Fri, 13 Jan 2023 16:20:41 GMT, Archie L. Cobbs wrote: >> I'm OK either way we can revisit this later either as part of this PR or in >> a future one. I let it to your consideration > > Sounds good - thanks. Ah. I just realized that we need to do it your way because of the following bug:

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v9]

2023-01-13 Thread Archie L . Cobbs
On Fri, 13 Jan 2023 20:21:24 GMT, Vicente Romero wrote: >> Archie L. Cobbs has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Use more idiomatic test for java.lang.Object. >> - Revert 27cb30129; the error was actually fixed in

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v9]

2023-01-13 Thread Archie L . Cobbs
On Fri, 13 Jan 2023 20:16:25 GMT, Vicente Romero wrote: >> Archie L. Cobbs has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Use more idiomatic test for java.lang.Object. >> - Revert 27cb30129; the error was actually fixed in

Re: RFR: 8177418: NPE is not apparent for methods in java.util.TimeZone API docs [v4]

2023-01-13 Thread Justin Lu
> When their input is null, the following methods in java.util.TimeZone throw a > NullPointerException: > > TimeZone.getTimeZone(String ID) > TimeZone.setID(String ID) > TimeZone.inDaylightTime(Date date) > > For example, > > > String someID = null; > TimeZone tz1 =

RFR: 8300140: ZipFile.isSignatureRelated returns true for files in META-INF subdirectories

2023-01-13 Thread Eirik Bjorsnos
Some call sites of SignatureFileVerifier.isBlockOrSF fails to check that files reside in META-INF directly, and not in a subdirectory of META-INF. The mentioned call sites needs updates to check and ignore such files. A new test VerifyUnrelatedSignatureFiles is added which verifies that [*.SF,

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v9]

2023-01-13 Thread Vicente Romero
On Fri, 13 Jan 2023 19:09:54 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v9]

2023-01-13 Thread Vicente Romero
On Fri, 13 Jan 2023 19:09:54 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is

Re: RFR: 8300010: UnsatisfiedLinkError on calling System.console().readPassword() on Windows

2023-01-13 Thread Naoto Sato
On Fri, 13 Jan 2023 14:12:36 GMT, Alan Bateman wrote: > I think we should try to have a cleaner separation between these native > methods. If JdkConsoleImpl_echo is changed to call > GetStdHandle(STD_INPUT_HANDLE) then it would avoid needing Console_md to > export java_io_Console_hStdIn. It

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v8]

2023-01-13 Thread Vicente Romero
On Fri, 13 Jan 2023 17:49:05 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java >> line 685: >> >>> 683: >>> 684: @Override >>> 685: public void visitDoLoop(JCDoWhileLoop tree) { >> >> I was thinking, code can also loop

Re: RFR: 8300010: UnsatisfiedLinkError on calling System.console().readPassword() on Windows [v2]

2023-01-13 Thread Naoto Sato
> Fixing a regression caused by the fix to > [JDK-8298971](https://bugs.openjdk.org/browse/JDK-8298971). The previous fix > lacked the native part change on Windows. Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Avoid sharing stdin

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v9]

2023-01-13 Thread Archie L . Cobbs
> This PR adds a new lint warning category `this-escape`. > > It also adds `@SuppressWarnings` annotations as needed to the JDK itself to > allow the JDK to continue to compile with `-Xlint:all`. > > A 'this' escape warning is generated for a constructor `A()` in a class `A` > when the

Re: RFR: 8300011: Refactor code examples to use @snippet in java.util.TimeZone [v4]

2023-01-13 Thread Iris Clark
On Fri, 13 Jan 2023 17:45:51 GMT, Justin Lu wrote: >> This PR implements JEP 413: Code Snippets in Java API Documentation for >> _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_. >> >> Code examples using ... blocks are replaced

Integrated: 8299865: Unnecessary NullPointerException catch in java.util.TimeZone#setDefaultZone

2023-01-13 Thread Justin Lu
On Wed, 11 Jan 2023 17:12:39 GMT, Justin Lu wrote: > In [JDK-4368016](https://bugs.openjdk.org/browse/JDK-4368016) > **TimeZone.setDefaultZone()** was updated so that > > _TimeZone.java [will] not cause an NPE. If getSystemTimeZoneID() > can't determine the time zone from java.home and

Re: RFR: 8300011: Refactor code examples to use @snippet in java.util.TimeZone [v4]

2023-01-13 Thread Lance Andersen
On Fri, 13 Jan 2023 17:45:51 GMT, Justin Lu wrote: >> This PR implements JEP 413: Code Snippets in Java API Documentation for >> _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_. >> >> Code examples using ... blocks are replaced

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v8]

2023-01-13 Thread Archie L . Cobbs
On Fri, 13 Jan 2023 17:35:08 GMT, Vicente Romero wrote: >> Archie L. Cobbs has updated the pull request incrementally with 16 >> additional commits since the last revision: >> >> - Fix bug where all but the last yeild statement were being ignored. >> - Add method RefSet.mapInto() and use to

Re: RFR: 8300077: Refactor code examples to use @snippet in java.text.ChoiceFormat

2023-01-13 Thread Naoto Sato
On Thu, 12 Jan 2023 22:31:24 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for > [java.text.ChoiceFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/ChoiceFormat.html). > > Code examples using ... blocks are replaced

Re: RFR: 8300011: Refactor code examples to use @snippet in java.util.TimeZone [v4]

2023-01-13 Thread Naoto Sato
On Fri, 13 Jan 2023 17:45:51 GMT, Justin Lu wrote: >> This PR implements JEP 413: Code Snippets in Java API Documentation for >> _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_. >> >> Code examples using ... blocks are replaced

Re: RFR: 8300011: Refactor code examples to use @snippet in java.util.TimeZone [v4]

2023-01-13 Thread Justin Lu
> This PR implements JEP 413: Code Snippets in Java API Documentation for > _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_. > > Code examples using ... blocks are replaced with the @ snippet > syntax where applicable. Justin Lu

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v8]

2023-01-13 Thread Vicente Romero
On Fri, 13 Jan 2023 04:04:36 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is

Re: RFR: 8300077: Refactor code examples to use @snippet in java.text.ChoiceFormat

2023-01-13 Thread Iris Clark
On Thu, 12 Jan 2023 22:31:24 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for > [java.text.ChoiceFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/ChoiceFormat.html). > > Code examples using ... blocks are replaced

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v8]

2023-01-13 Thread Archie L . Cobbs
On Fri, 13 Jan 2023 16:12:50 GMT, Vicente Romero wrote: >> Yes... I did it that way is so that it doesn't require any adaptation >> if/when JDK-8194743 ever gets implemented. And it keeps the code a little >> simpler in exchange for a little redundancy. >> >> I'm happy to fix this if you

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v7]

2023-01-13 Thread Archie L . Cobbs
On Fri, 13 Jan 2023 16:06:04 GMT, Maurizio Cimadamore wrote: >>> Something seems to be up with the lint description for this-escape - >>> compare this: >> >> Oops, will fix - thanks. > >> The decision was to go with drawing the "warning boundary" at the >> compilation unit. The reasoning is

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v8]

2023-01-13 Thread Vicente Romero
On Fri, 13 Jan 2023 15:14:05 GMT, Archie L. Cobbs wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java >> line 516: >> >>> 514: Name name = TreeInfo.name(invoke.meth); >>> 515: if (name == names._super) { >>> 516:

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v7]

2023-01-13 Thread Maurizio Cimadamore
On Fri, 13 Jan 2023 15:08:59 GMT, Archie L. Cobbs wrote: >>> I guess I was confused because, while subclasses are a particularly sneaky >>> case where uninitialized values can show up, the above leak seems >>> potentially dangerous as well... >> >> Yes - and this very question did come up in

Re: RFR: 8206890: jlink --endian XXX generates unusable image if endian-ness does not match architecture

2023-01-13 Thread Alan Bateman
On Wed, 11 Jan 2023 13:19:32 GMT, Jaikiran Pai wrote: > Can I please get a review for this change which proposes to fix the issue > reported in https://bugs.openjdk.org/browse/JDK-8206890? > > The `jlink` command allows a `--endian` option to specify the byte order in > the generated image.

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v8]

2023-01-13 Thread Archie L . Cobbs
On Fri, 13 Jan 2023 12:42:24 GMT, Vicente Romero wrote: >> Archie L. Cobbs has updated the pull request incrementally with 16 >> additional commits since the last revision: >> >> - Fix bug where all but the last yeild statement were being ignored. >> - Add method RefSet.mapInto() and use to

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v7]

2023-01-13 Thread Archie L . Cobbs
On Fri, 13 Jan 2023 15:08:43 GMT, Archie L. Cobbs wrote: >> Something seems to be up with the lint description for this-escape - compare >> this: >> >> >> serial Warn about Serializable classes that do not have a >> serialVersionUID field. >> Also

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v7]

2023-01-13 Thread Archie L . Cobbs
On Fri, 13 Jan 2023 11:08:33 GMT, Maurizio Cimadamore wrote: >> Perhaps my confusion might come from the name `this-escape` of the lint >> warning - which seems overpromising in this respect. But I looked at the >> description of the lint warning using `javac --help-lint` and I got this: >>

Re: RFR: 8038146: Clarify NavigableMap/TreeMap support for Entry.setValue

2023-01-13 Thread Alan Bateman
On Thu, 12 Jan 2023 01:50:51 GMT, Stuart Marks wrote: > Also additional verbiage regarding Map.Entry objects in general and their > possible connection to an underlying Map. src/java.base/share/classes/java/util/Map.java line 405: > 403: * {@link Iterator} or implicitly via the enhanced

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v8]

2023-01-13 Thread Vicente Romero
On Fri, 13 Jan 2023 04:04:36 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is

Re: RFR: 8300010: UnsatisfiedLinkError on calling System.console().readPassword() on Windows

2023-01-13 Thread Alan Bateman
On Thu, 12 Jan 2023 17:08:29 GMT, Naoto Sato wrote: > Fixing a regression caused by the fix to > [JDK-8298971](https://bugs.openjdk.org/browse/JDK-8298971). The previous fix > lacked the native part change on Windows. I think we should try to have a cleaner separation between these native

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v8]

2023-01-13 Thread Vicente Romero
On Fri, 13 Jan 2023 04:04:36 GMT, Archie L. Cobbs wrote: >> This PR adds a new lint warning category `this-escape`. >> >> It also adds `@SuppressWarnings` annotations as needed to the JDK itself to >> allow the JDK to continue to compile with `-Xlint:all`. >> >> A 'this' escape warning is

Re: RFR: 8293841: RISC-V: Implementation of Foreign Function & Memory API (Preview) [v5]

2023-01-13 Thread Jorn Vernee
On Tue, 10 Jan 2023 15:15:23 GMT, Feilong Jiang wrote: >> Add experimental Foreign Function & Memory API support for RISC-V. >> >> For details of the FFM API RISC-V port please refer to [JBS >> issue](https://bugs.openjdk.org/browse/JDK-8293841) >> >> Testing: >> >> - [x] jdk_foreign with

Re: RFR: 8300011: Refactor code examples to use @snippet in java.util.TimeZone [v3]

2023-01-13 Thread Lance Andersen
On Thu, 12 Jan 2023 22:21:39 GMT, Justin Lu wrote: >> This PR implements JEP 413: Code Snippets in Java API Documentation for >> _[java.util.TimeZone](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/TimeZone.html)_. >> >> Code examples using ... blocks are replaced

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v7]

2023-01-13 Thread Maurizio Cimadamore
On Fri, 13 Jan 2023 10:58:33 GMT, Maurizio Cimadamore wrote: >> Caring about the proper initialization of any class in the _current_ >> compilation unit is an explicit non-goal. >> >> We only care about bugs where a superclass and subclass are in separate >> compilation units. > > So, to

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v7]

2023-01-13 Thread Maurizio Cimadamore
On Fri, 13 Jan 2023 11:05:51 GMT, Maurizio Cimadamore wrote: >> So, to clarify, in this case: >> >> >> import java.util.*; >> >> class B { >> final Object ref; >> >> private B(Object ref) { >> Foo.consume(this); >> this.ref = ref; >> } >> } >> >> >>

Re: RFR: 8300077: Refactor code examples to use @snippet in java.text.ChoiceFormat

2023-01-13 Thread Lance Andersen
On Thu, 12 Jan 2023 22:31:24 GMT, Justin Lu wrote: > This PR implements _JEP 413: Code Snippets in Java API Documentation_ for > [java.text.ChoiceFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/ChoiceFormat.html). > > Code examples using ... blocks are replaced

Re: RFR: 8015831: Add lint check for calling overridable methods from a constructor [v7]

2023-01-13 Thread Maurizio Cimadamore
On Thu, 12 Jan 2023 21:04:09 GMT, Archie L. Cobbs wrote: >> but what if `m` is a static method in a separate compilation unit? Should it >> be able to observe a partially initialized Foo? > > Caring about the proper initialization of any class in the _current_ > compilation unit is an explicit

Re: RFR: 8299865: Unnecessary NullPointerException catch in java.util.TimeZone#setDefaultZone

2023-01-13 Thread Andrey Turbanov
On Wed, 11 Jan 2023 17:12:39 GMT, Justin Lu wrote: > In [JDK-4368016](https://bugs.openjdk.org/browse/JDK-4368016) > **TimeZone.setDefaultZone()** was updated so that > > _TimeZone.java [will] not cause an NPE. If getSystemTimeZoneID() > can't determine the time zone from java.home and

Re: ZipFile.isSignatureRelated returns true for files in META-INF subdirectories

2023-01-13 Thread Alan Bateman
Forwarding to security-dev as that is where issues around signed JARs are usually discussed. -Alan. On 10/01/2023 17:00, Eirik Bjørsnøs wrote: Hi, ZipFile.isSignatureRelated currently returns true for paths such as the following: