On Thu, 7 Dec 2023 22:57:52 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

>> The fix for a regression caused by the 
>> https://bugs.openjdk.org/browse/JDK-6508941. it does not take into account 
>> RPC_E_CHANGED_MODE when COM was already initialized using 
>> COINIT_MULTITHREADED mode.
>> 
>> @aivanov-jdk please take a look.
>
> Sergey Bylokhov has updated the pull request incrementally with three 
> additional commits since the last revision:
> 
>  - 8270269: Desktop.browse method fails if earlier CoInitialize call as 
> COINIT_MULTITHREADED
>  - Revert "6508941: java.awt.Desktop.open causes VM to crash with video files 
> sporadically"
>    
>    This reverts commit 85269470
>  - Revert "8270269: Desktop.browse method fails if earlier CoInitialize call 
> as COINIT_MULTITHREADED"
>    
>    This reverts commit 4908d9c220950683d3a5010d12ab756eff6b6fa7.

Looks good to me.

src/java.desktop/windows/classes/sun/awt/windows/WDesktopPeer.java line 120:

> 118:         if (errmsg != null) {
> 119:             throw new IOException("Failed to " + verb + " " + uri +
> 120:                                   ". Error message: " + errmsg);

Suggestion:

            throw new IOException("Failed to " + verb + " " + uri
                                  + ". Error message: " + errmsg);

I prefer this style where the operator is wrapped to the continuation line, 
it's this style that is recommended by [Java Style 
Guidelines](https://cr.openjdk.org/~alundblad/styleguide/index-v6.html#toc-wrapping-lines)
 (see Wrapping Expressions section; unfortunately, there are no anchors for 
level 4 headers) as well as by the [original Code 
Conventions](https://www.oracle.com/java/technologies/javase/codeconventions-indentation.html#272),
 but the formatting is absolutely in the HTML version.

At the time, I like your new alignment.

As far as I know, there are no agreed code style convention that clientlibs 
follow…

src/java.desktop/windows/native/libawt/windows/awt_Desktop.cpp line 89:

> 87:     unsigned oldcontrol87 = _control87(0, 0);
> 88:     HINSTANCE retval = ::ShellExecute(NULL, verb_c, fileOrUri_c, NULL, 
> NULL,
> 89:                                       SW_SHOWNORMAL);

Leave it unmodified, perhaps?

-------------

Marked as reviewed by aivanov (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17010#pullrequestreview-1772646683
PR Review Comment: https://git.openjdk.org/jdk/pull/17010#discussion_r1420667007
PR Review Comment: https://git.openjdk.org/jdk/pull/17010#discussion_r1420664568

Reply via email to