Re: RFR: 8291917: Windows - Dump error diagnostics when runtime libraries fail to load [v4]

2022-08-06 Thread Julian Waters
> Please review a small patch for dumping the failure reason when the MSVCRT > libraries or the Java Virtual Machine fails to load on Windows, which can > provide invaluable insight when debugging related launcher issues. This also > fixes a small bug in the Windows implementation of

[BUG] Collections.unmodifiableMap(map).entrySet().iterator().forEachRemaining is missing null check

2022-08-06 Thread Rob Spoor
Hi, I was working on upgrading another library of mine from Java 8 to 11, and I noticed my unit tests started failing. Some debugging traced the cause back to java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet and its iterator() implementation. In Java 8, the implementation only

Re: RFR: 8291641: Optimize StackTraceElement.toString() [v7]

2022-08-06 Thread David Schlosnagle
> I would like to contribute an optimized version of > `StackTraceElement#toString()` that uses a single StringBuilder throughout > creation to avoid intermediate `String` allocations. > `StackTraceElement#toString()` is used in a number of JDK code paths > including

Re: [jdk19] RFR: 8278274: Update nroff pages in JDK 19 before RC

2022-08-06 Thread Patrick Pfeifer
On Sat, 6 Aug 2022 09:01:39 GMT, Patrick Pfeifer wrote: >> src/java.base/share/man/keytool.1 line 456: >> >>> 454: \f[CB]PrivateKeyEntry\f[R] for the signer that already exists in the >>> 455: keystore. >>> 456: This option is used to sign the certificate with the signer?s private >> >> Not a

Re: RFR: 8291917: Windows - Dump error diagnostics when runtime libraries fail to load [v3]

2022-08-06 Thread Thomas Stuefe
On Thu, 4 Aug 2022 17:42:45 GMT, Julian Waters wrote: >> Please review a small patch for dumping the failure reason when the MSVCRT >> libraries or the Java Virtual Machine fails to load on Windows, which can >> provide invaluable insight when debugging related launcher issues. This also >>

Re: RFR: 8291924: jpackage: l10n for Windows context menu label [v2]

2022-08-06 Thread Alexey Semenyuk
On Fri, 5 Aug 2022 17:04:54 GMT, Alex Kasko wrote: >> This change adds `ContextMenuCommandLabel` l10n property for file >> association context menu label. It is a follow-up to [this PR >> comment](https://github.com/openjdk/jdk/pull/9224#issuecomment-1169286082). >> >> Note, non-EN l10n

Re: RFR: 8291978: jpackage: allow to override primary l10n files on Windows

2022-08-06 Thread Alexey Semenyuk
On Fri, 5 Aug 2022 16:14:35 GMT, Alex Kasko wrote: > This change is a follow-up to [this > comment](https://bugs.openjdk.org/browse/JDK-8290519?focusedCommentId=14512038=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14512038). > > Override implementation is based on

Re: RFR: 8291917: Windows - Dump error diagnostics when runtime libraries fail to load [v3]

2022-08-06 Thread Julian Waters
On Sat, 6 Aug 2022 11:36:44 GMT, Thomas Stuefe wrote: >> The only non Windows code that uses the `DLL_ERROR4` macro is Unix's >> java_md_common.c, where it reports the same `JVM_FindClassFromBootLoader` >> issue that Windows also does, and the shared args.c when a file cannot be >> found by

Re: RFR: 8291917: Windows - Dump error diagnostics when runtime libraries fail to load [v3]

2022-08-06 Thread Julian Waters
On Sat, 6 Aug 2022 10:54:56 GMT, Thomas Stuefe wrote: > Hi Julian, > > I don't get it. > > AFAICS the existing version displays the failure reason for win32 API just > fine, appending it to the message. Where is the bug? I see that the message > was omitted for CRT errors, so that is okay to

Re: RFR: 8291917: Windows - Dump error diagnostics when runtime libraries fail to load [v3]

2022-08-06 Thread Thomas Stuefe
On Sat, 6 Aug 2022 11:14:55 GMT, Julian Waters wrote: >> src/java.base/share/native/libjli/emessages.h line 111: >> >>> 109: #define DLL_ERROR2 "Error: failed %s, because %s" >>> 110: #define DLL_ERROR3 "Error: could not find executable %s" >>> 111: #define DLL_ERROR4 "Error:

Re: RFR: 8291917: Windows - Dump error diagnostics when runtime libraries fail to load [v3]

2022-08-06 Thread Julian Waters
On Sat, 6 Aug 2022 10:36:05 GMT, Thomas Stuefe wrote: >> Julian Waters has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Missing spacing between errors > > src/java.base/share/native/libjli/emessages.h line 111: > >> 109: #define

Re: RFR: 8291917: Windows - Dump error diagnostics when runtime libraries fail to load [v3]

2022-08-06 Thread Thomas Stuefe
On Thu, 4 Aug 2022 17:42:45 GMT, Julian Waters wrote: >> Please review a small patch for dumping the failure reason when the MSVCRT >> libraries or the Java Virtual Machine fails to load on Windows, which can >> provide invaluable insight when debugging related launcher issues. This also >>

Re: RFR: 8291917: Windows - Dump error diagnostics when runtime libraries fail to load [v3]

2022-08-06 Thread Julian Waters
On Thu, 4 Aug 2022 17:42:45 GMT, Julian Waters wrote: >> Please review a small patch for dumping the failure reason when the MSVCRT >> libraries or the Java Virtual Machine fails to load on Windows, which can >> provide invaluable insight when debugging related launcher issues. This also >>

Integrated: 8291954: Use Optional.isEmpty instead of !Optional.isPresent in java.base

2022-08-06 Thread Andrey Turbanov
On Mon, 1 Aug 2022 06:51:44 GMT, Andrey Turbanov wrote: > I propose to replace usages of !Optional.isPresent() with Optional.isEmpty > method. > It's makes code a bit easier to read. > Noticing negation before long chain of method calls is hard. This pull request has now been integrated.

More elegant multi-condition groupby. #9719

2022-08-06 Thread (11I10I24) ?? ?? ?? ??
Hi, team I have two suggestions Firstly: If we can provide a new API for grouping (java.util.stream.Collectors) such as: userList.stream().collect(Collectors.groupingBy(User::getName, User::getCity)) userList.stream().collect(Collectors.groupingBy("-", User::getName, User::getCity,

Re: [jdk19] RFR: 8278274: Update nroff pages in JDK 19 before RC

2022-08-06 Thread Patrick Pfeifer
On Mon, 18 Jul 2022 15:22:01 GMT, Jonathan Gibbons wrote: >> Please review these changes to the nroff manpage files so that they match >> their markdown sources that Oracle maintains. >> >> All pages at a minimum have 19-ea replaced with 19, and copyright set to >> 2022 if needed.

Re: RFR: 8290036: Define and specify Runtime shutdown sequence [v4]

2022-08-06 Thread Alan Bateman
On Sat, 6 Aug 2022 00:42:23 GMT, Stuart Marks wrote: >> Initial edits to addShutdownHook from Alex. >> >> See [JDK-8290036](https://bugs.openjdk.org/browse/JDK-8290036). > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > >

RFR: 8290041: ModuleDescriptor.hashCode is inconsistent

2022-08-06 Thread Jaikiran Pai
Can I please get a review of this change which proposes to fix https://bugs.openjdk.org/browse/JDK-8290041? As noted by the reporter, the current implementation is buggy since the calculation can result in a different value of the hashcode depending on the order of iteration of the