Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-07 Thread Matthias Baesken
On Thu, 7 Mar 2024 08:08:45 GMT, Alan Bateman  wrote:

> Latest version looks good to me. As have been pointed out, there at least 2 
> files where the copyright header was updated but there are no changes, I 
> assume left over from previous iterations. I assume the RESTARTABLE-close in 
> libattach/VirtualMachineImpl.c will be tracked as a separate issue.


Yes  this was from the commit iterations.
The RESTARTABLE-close issue will be tracked here 
https://bugs.openjdk.org/browse/JDK-8327468
8327468: Do not restart close if errno is EINTR [macOS/linux]

Thanks for the review!

-

PR Comment: https://git.openjdk.org/jdk/pull/18132#issuecomment-1982996784


Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-07 Thread Matthias Baesken
On Wed, 6 Mar 2024 17:14:25 GMT, Christoph Langer  wrote:

>> Matthias Baesken has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Introduce windows jni_util_md.h
>
> src/java.base/share/native/libjava/jni_util.h line 30:
> 
>> 28: 
>> 29: #include "jni.h"
>> 30: #include "jni_util_md.h"
> 
> This file needs copyright year update

Agree, updated !

-

PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1515719458


Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-07 Thread Alan Bateman
On Wed, 6 Mar 2024 16:30:23 GMT, Matthias Baesken  wrote:

>> We define the RESTARTABLE macro again and again at a lot of places in the 
>> JDK native codebase. This could be centralized to avoid repeating it again 
>> and again !
>
> Matthias Baesken has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Introduce windows jni_util_md.h

Latest version looks good to me. As have been pointed out, there at least 2 
files where the copyright header was updated but there are no changes, I assume 
left over from previous iterations. I assume the RESTARTABLE-close in 
libattach/VirtualMachineImpl.c will be tracked as a separate issue.

-

Marked as reviewed by alanb (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18132#pullrequestreview-1921724534


Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread Guoxiong Li
On Thu, 7 Mar 2024 07:20:15 GMT, David Holmes  wrote:

> Oracle requests/requires that the Oracle copyright always be updated when a 
> file is modified.

Got it. Thanks for your explanation.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1515672685


Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread David Holmes
On Thu, 7 Mar 2024 03:00:11 GMT, Guoxiong Li  wrote:

>> Matthias Baesken has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Introduce windows jni_util_md.h
>
> src/java.base/aix/native/libnio/ch/Pollset.c line 3:
> 
>> 1: /*
>> 2:  * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights 
>> reserved.
>> 3:  * Copyright (c) 2012, 2024 SAP SE. All rights reserved.
> 
> It seems you only need to update the copyright of the company you work for.

Oracle requests/requires that the Oracle copyright always be updated when a 
file is modified.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1515660944


Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread Guoxiong Li
On Wed, 6 Mar 2024 16:30:23 GMT, Matthias Baesken  wrote:

>> We define the RESTARTABLE macro again and again at a lot of places in the 
>> JDK native codebase. This could be centralized to avoid repeating it again 
>> and again !
>
> Matthias Baesken has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Introduce windows jni_util_md.h

src/java.base/aix/native/libnio/ch/Pollset.c line 3:

> 1: /*
> 2:  * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights 
> reserved.
> 3:  * Copyright (c) 2012, 2024 SAP SE. All rights reserved.

It seems you only need to update the copyright of the company you work for.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1515417217


Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread Brian Burkhalter
On Wed, 6 Mar 2024 16:30:23 GMT, Matthias Baesken  wrote:

>> We define the RESTARTABLE macro again and again at a lot of places in the 
>> JDK native codebase. This could be centralized to avoid repeating it again 
>> and again !
>
> Matthias Baesken has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Introduce windows jni_util_md.h

src/java.base/unix/native/libnio/ch/Net.c line 2:

> 1: /*
> 2:  * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights 
> reserved.

Is the year change needed as it looks like nothing was changed?

-

PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1515273416


Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread Christoph Langer
On Wed, 6 Mar 2024 16:30:23 GMT, Matthias Baesken  wrote:

>> We define the RESTARTABLE macro again and again at a lot of places in the 
>> JDK native codebase. This could be centralized to avoid repeating it again 
>> and again !
>
> Matthias Baesken has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Introduce windows jni_util_md.h

Looks good to me modulo a few license year things...

src/java.base/macosx/native/libnio/ch/KQueue.c line 2:

> 1: /*
> 2:  * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights 
> reserved.

Here you only change the license year?

src/java.base/share/native/libjava/jni_util.h line 30:

> 28: 
> 29: #include "jni.h"
> 30: #include "jni_util_md.h"

This file needs copyright year update

src/java.base/unix/native/libjava/childproc.h line 75:

> 73: #define FAIL_FILENO (STDERR_FILENO + 1)
> 74: 
> 75: /* TODO: Refactor. */

Copyright year update missing.

src/java.base/unix/native/libnio/ch/nio_util.h line 34:

> 32: #include 
> 33: 
> 34: #define RESTARTABLE(_cmd, _result) do { \

Copyright year update

src/java.base/unix/native/libnio/fs/UnixFileSystem.c line 38:

> 36: #include "sun_nio_fs_UnixFileSystem.h"
> 37: 
> 38: #define RESTARTABLE(_cmd, _result) do { \

Copyright year update

-

Changes requested by clanger (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18132#pullrequestreview-1920355323
PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1514867262
PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1514873505
PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1514876266
PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1514878580
PR Review Comment: https://git.openjdk.org/jdk/pull/18132#discussion_r1514878995


Re: RFR: JDK-8327444: simplify RESTARTABLE macro usage in JDK codebase [v3]

2024-03-06 Thread Matthias Baesken
> We define the RESTARTABLE macro again and again at a lot of places in the JDK 
> native codebase. This could be centralized to avoid repeating it again and 
> again !

Matthias Baesken has updated the pull request incrementally with one additional 
commit since the last revision:

  Introduce windows jni_util_md.h

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/18132/files
  - new: https://git.openjdk.org/jdk/pull/18132/files/f30a189d..2930075d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=18132&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=18132&range=01-02

  Stats: 24 lines in 19 files changed: 1 ins; 22 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/18132.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18132/head:pull/18132

PR: https://git.openjdk.org/jdk/pull/18132