From asemenov at openjdk.org Thu Jun 1 15:01:37 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 1 Jun 2023 15:01:37 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v4] In-Reply-To: References: Message-ID: > When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". > They can be fixed with small changes. Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14033/files - new: https://git.openjdk.org/jdk/pull/14033/files/d5b70cb2..b423bd4c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14033&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14033&range=02-03 Stats: 7 lines in 2 files changed: 1 ins; 4 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/14033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14033/head:pull/14033 PR: https://git.openjdk.org/jdk/pull/14033 From asemenov at openjdk.org Thu Jun 1 15:07:11 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 1 Jun 2023 15:07:11 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v3] In-Reply-To: References: Message-ID: On Wed, 31 May 2023 13:52:39 GMT, Weijun Wang wrote: >> Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: >> >> update > > src/java.security.jgss/share/native/libj2gss/gssapi.h line 47: > >> 45: >> 46: // Condition was copied from >> 47: // Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/gssapi/gssapi.h > > In the current version of the file above, it's written as > > #if defined(__APPLE__) && (defined(__ppc__) ||... > > Is it better? done ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1213297788 From weijun at openjdk.org Thu Jun 1 15:07:12 2023 From: weijun at openjdk.org (Weijun Wang) Date: Thu, 1 Jun 2023 15:07:12 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v3] In-Reply-To: References: Message-ID: On Thu, 1 Jun 2023 15:02:16 GMT, Artem Semenov wrote: >> src/java.security.jgss/share/native/libj2gss/gssapi.h line 47: >> >>> 45: >>> 46: // Condition was copied from >>> 47: // Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/gssapi/gssapi.h >> >> In the current version of the file above, it's written as >> >> #if defined(__APPLE__) && (defined(__ppc__) ||... >> >> Is it better? > > done I didn't ask to revert the change. It's `s/TARGET_OS_MAC/defined(__APPLE__)/`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1213300305 From asemenov at openjdk.org Tue Jun 6 17:35:34 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Tue, 6 Jun 2023 17:35:34 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v3] In-Reply-To: References: Message-ID: On Thu, 1 Jun 2023 15:04:09 GMT, Weijun Wang wrote: >> done > > I didn't ask to revert the change. It's `s/TARGET_OS_MAC/defined(__APPLE__)/`. This is rarely used in the code and is not the essence of the current changes. If you introduce such changes, then throughout the code. Moreover, this can lead to problems, such as, for example, here: https://bugs.openjdk.org/browse/JDK-8309225 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1220056527 From weijun at openjdk.org Tue Jun 6 17:50:00 2023 From: weijun at openjdk.org (Weijun Wang) Date: Tue, 6 Jun 2023 17:50:00 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v3] In-Reply-To: References: Message-ID: On Tue, 6 Jun 2023 17:32:35 GMT, Artem Semenov wrote: >> I didn't ask to revert the change. It's `s/TARGET_OS_MAC/defined(__APPLE__)/`. > > This is rarely used in the code and is not the essence of the current changes. > If you introduce such changes, then throughout the code. > Moreover, this can lead to problems, such as, for example, here: https://bugs.openjdk.org/browse/JDK-8309225 I'm not a clang expect, I was just asking if modifying the current `#if TARGET_OS_MAC` check into `#if defined(__APPLE__)` is also a solution. The comment on lines 46-47 says the condition was copied from a macOS SDK file and that's what the file is using now. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1220071779 From avu at openjdk.org Wed Jun 7 07:00:59 2023 From: avu at openjdk.org (Alexey Ushakov) Date: Wed, 7 Jun 2023 07:00:59 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v4] In-Reply-To: References: Message-ID: On Thu, 1 Jun 2023 15:01:37 GMT, Artem Semenov wrote: >> When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". >> They can be fixed with small changes. > > Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: > > update Marked as reviewed by avu (Committer). The latest changes look good to me. ------------- PR Review: https://git.openjdk.org/jdk/pull/14033#pullrequestreview-1466776433 PR Comment: https://git.openjdk.org/jdk/pull/14033#issuecomment-1580043192 From asemenov at openjdk.org Sun Jun 11 15:40:28 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Sun, 11 Jun 2023 15:40:28 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v3] In-Reply-To: References: Message-ID: On Tue, 6 Jun 2023 17:47:02 GMT, Weijun Wang wrote: >> This is rarely used in the code and is not the essence of the current changes. >> If you introduce such changes, then throughout the code. >> Moreover, this can lead to problems, such as, for example, here: https://bugs.openjdk.org/browse/JDK-8309225 > > I'm not a clang expect, I was just asking if modifying the current `#if TARGET_OS_MAC` check into `#if defined(__APPLE__)` is also a solution. The comment on lines 46-47 says the condition was copied from a macOS SDK file and that's what the file is using now. I think you can create a separate ticket and pull request to discuss this issue. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1225842637 From asemenov at openjdk.org Sun Jun 11 16:38:31 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Sun, 11 Jun 2023 16:38:31 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v5] In-Reply-To: References: Message-ID: > When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". > They can be fixed with small changes. Artem Semenov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: - update - update - update - update - 8308286 Fix clang warnings in linux code ------------- Changes: https://git.openjdk.org/jdk/pull/14033/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14033&range=04 Stats: 16 lines in 6 files changed: 14 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/14033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14033/head:pull/14033 PR: https://git.openjdk.org/jdk/pull/14033 From erikj at openjdk.org Mon Jun 12 12:30:55 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 12 Jun 2023 12:30:55 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v5] In-Reply-To: References: Message-ID: On Sun, 11 Jun 2023 16:38:31 GMT, Artem Semenov wrote: >> When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". >> They can be fixed with small changes. > > Artem Semenov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: > > - update > - update > - update > - update > - 8308286 Fix clang warnings in linux code Build changes look ok. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14033#issuecomment-1587242876 From djelinski at openjdk.org Wed Jun 21 07:48:10 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 21 Jun 2023 07:48:10 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v5] In-Reply-To: References: Message-ID: On Sun, 11 Jun 2023 16:38:31 GMT, Artem Semenov wrote: >> When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". >> They can be fixed with small changes. > > Artem Semenov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: > > - update > - update > - update > - update > - 8308286 Fix clang warnings in linux code Please update copyright years where they aren't at 2023 yet. I verified these changes on Ubuntu 20.04 + clang 10; they are both necessary and sufficient to make the build pass with warnings as errors. I saw one more warning: clang: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument] in `BUILD_SYSLOOKUPLIB_link.log`, but that one does not break the build. I'm going to approve this once you fix the mentioned issues. Thanks for working on this! make/modules/java.desktop/lib/Awt2dLibraries.gmk line 235: > 233: DISABLED_WARNINGS_gcc := int-to-pointer-cast, \ > 234: DISABLED_WARNINGS_gcc_awt_Taskbar.c := parentheses, \ > 235: DISABLED_WARNINGS_clang_awt_Taskbar.c := parentheses, \ please group the disabled warnings by compiler (gcc, then clang, then clang_aix) ------------- PR Review: https://git.openjdk.org/jdk/pull/14033#pullrequestreview-1489972241 PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1236510850 From asemenov at openjdk.org Thu Jun 22 09:13:21 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 22 Jun 2023 09:13:21 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v6] In-Reply-To: References: Message-ID: > When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". > They can be fixed with small changes. Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14033/files - new: https://git.openjdk.org/jdk/pull/14033/files/101bf062..842d33d8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14033&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14033&range=04-05 Stats: 26 lines in 5 files changed: 11 ins; 11 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/14033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14033/head:pull/14033 PR: https://git.openjdk.org/jdk/pull/14033 From asemenov at openjdk.org Thu Jun 22 09:13:24 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 22 Jun 2023 09:13:24 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v5] In-Reply-To: References: Message-ID: <1uzHyJeBll4YnB4uuKYWFX8e7z66iWHoYK4Ksu8T3Ic=.c2a86584-ea77-48f9-8306-368edb33d0af@github.com> On Wed, 21 Jun 2023 07:35:16 GMT, Daniel Jeli?ski wrote: >> Artem Semenov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: >> >> - update >> - update >> - update >> - update >> - 8308286 Fix clang warnings in linux code > > make/modules/java.desktop/lib/Awt2dLibraries.gmk line 235: > >> 233: DISABLED_WARNINGS_gcc := int-to-pointer-cast, \ >> 234: DISABLED_WARNINGS_gcc_awt_Taskbar.c := parentheses, \ >> 235: DISABLED_WARNINGS_clang_awt_Taskbar.c := parentheses, \ > > please group the disabled warnings by compiler (gcc, then clang, then clang_aix) Done ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1238236415 From djelinski at openjdk.org Thu Jun 22 10:02:09 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Thu, 22 Jun 2023 10:02:09 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v6] In-Reply-To: References: Message-ID: On Thu, 22 Jun 2023 09:13:21 GMT, Artem Semenov wrote: >> When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". >> They can be fixed with small changes. > > Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: > > update make/modules/java.desktop/lib/Awt2dLibraries.gmk line 241: > 239: DISABLED_WARNINGS_gcc_OGLPaints.c := format-nonliteral, \ > 240: DISABLED_WARNINGS_gcc_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \ > 241: DISABLED_WARNINGS_gcc_X11SurfaceData.c := implicit-fallthrough pointer-to-int-cast, \ Suggestion: DISABLED_WARNINGS_gcc_GLXSurfaceData.c := unused-function, \ DISABLED_WARNINGS_gcc_gtk2_interface.c := parentheses type-limits, \ DISABLED_WARNINGS_gcc_gtk3_interface.c := parentheses type-limits unused-function, \ DISABLED_WARNINGS_gcc_OGLBufImgOps.c := format-nonliteral, \ DISABLED_WARNINGS_gcc_OGLPaints.c := format-nonliteral, \ DISABLED_WARNINGS_gcc_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \ DISABLED_WARNINGS_gcc_X11SurfaceData.c := implicit-fallthrough pointer-to-int-cast, \ make/modules/java.desktop/lib/Awt2dLibraries.gmk line 260: > 258: DISABLED_WARNINGS_clang_aix_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \ > 259: DISABLED_WARNINGS_clang_aix_awt_InputMethod.c := sign-compare, \ > 260: DISABLED_WARNINGS_clang_screencast_pipewire.c := format-nonliteral, \ move this one closer to the other clang (non-aix) suppressions ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1238296391 PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1238297332 From kevinw at openjdk.org Thu Jun 22 11:11:06 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 22 Jun 2023 11:11:06 GMT Subject: jmx-dev RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks Message-ID: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> JNI calls were identified, where we do not check for a pending Exception afterwards. (JDK-8162530 cleaned up up some of these kind of issues some years back, but more were found.) I tested a code change to manually create an Exception before some of the new ExceptionCheck calls, and this is correctly recognised, we see an Exception thrown by the native getLastGcInfo0, e.g. java.lang.NullPointerException: XXX Test Exception at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo0(Native Method) at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo(GcInfoBuilder.java:77) at jdk.management/com.sun.management.internal.GarbageCollectorExtImpl.getLastGcInfo(GarbageCollectorExtImpl.java:69) at LastGCInfo.main(LastGCInfo.java:53) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) at java.base/java.lang.Thread.run(Thread.java:1570) Tested with all of test/jdk/com/sun/management including test/jdk/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java ------------- Commit messages: - 8310628: GcInfoBuilder.c missing JNI Exception checks Changes: https://git.openjdk.org/jdk/pull/14613/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14613&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8310628 Stats: 29 lines in 1 file changed: 20 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/14613.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14613/head:pull/14613 PR: https://git.openjdk.org/jdk/pull/14613 From asemenov at openjdk.org Thu Jun 22 17:25:08 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 22 Jun 2023 17:25:08 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v7] In-Reply-To: References: Message-ID: > When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". > They can be fixed with small changes. Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14033/files - new: https://git.openjdk.org/jdk/pull/14033/files/842d33d8..c4ca2205 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14033&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14033&range=05-06 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/14033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14033/head:pull/14033 PR: https://git.openjdk.org/jdk/pull/14033 From asemenov at openjdk.org Thu Jun 22 17:25:10 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 22 Jun 2023 17:25:10 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v6] In-Reply-To: References: Message-ID: On Thu, 22 Jun 2023 09:58:49 GMT, Daniel Jeli?ski wrote: >> Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: >> >> update > > make/modules/java.desktop/lib/Awt2dLibraries.gmk line 260: > >> 258: DISABLED_WARNINGS_clang_aix_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \ >> 259: DISABLED_WARNINGS_clang_aix_awt_InputMethod.c := sign-compare, \ >> 260: DISABLED_WARNINGS_clang_screencast_pipewire.c := format-nonliteral, \ > > move this one closer to the other clang (non-aix) suppressions Done. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1238824459 From mchung at openjdk.org Thu Jun 22 18:18:02 2023 From: mchung at openjdk.org (Mandy Chung) Date: Thu, 22 Jun 2023 18:18:02 GMT Subject: jmx-dev RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks In-Reply-To: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> References: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> Message-ID: On Thu, 22 Jun 2023 10:10:07 GMT, Kevin Walls wrote: > JNI calls were identified, where we do not check for a pending Exception afterwards. > > (JDK-8162530 cleaned up up some of these kind of issues some years back, but more were found.) > > I tested a code change to manually create an Exception before some of the new ExceptionCheck calls, and this is correctly recognised, we see an Exception thrown by the native getLastGcInfo0, e.g. > > java.lang.NullPointerException: XXX Test Exception > at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo0(Native Method) > at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo(GcInfoBuilder.java:77) > at jdk.management/com.sun.management.internal.GarbageCollectorExtImpl.getLastGcInfo(GarbageCollectorExtImpl.java:69) > at LastGCInfo.main(LastGCInfo.java:53) > at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) > at java.base/java.lang.reflect.Method.invoke(Method.java:580) > at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) > at java.base/java.lang.Thread.run(Thread.java:1570) > > Tested with all of test/jdk/com/sun/management including test/jdk/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java Looks fine. It may worth refactoring the code to set an element in an utility method. jobject obj = JNU_NewObjectByName(env, class_name, signature, value); if ((*env)->ExceptionCheck(env)) { return; } (*env)->SetObjectArrayElement(env, array, index, obj); ------------- PR Review: https://git.openjdk.org/jdk/pull/14613#pullrequestreview-1493765649 From kevinw at openjdk.org Thu Jun 22 21:00:02 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 22 Jun 2023 21:00:02 GMT Subject: jmx-dev RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks In-Reply-To: References: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> Message-ID: On Thu, 22 Jun 2023 18:14:48 GMT, Mandy Chung wrote: > Looks fine. It may worth refactoring the code to set an element in an utility method. > > ``` > jobject obj = JNU_NewObjectByName(env, class_name, signature, value); > if ((*env)->ExceptionCheck(env)) { > return; > } > (*env)->SetObjectArrayElement(env, array, index, obj); > ``` Thanks Mandy, I would suggest to just do this simple change as it seems most likely to be correct. We are here because a tool found the missing exception checks, not because this code is looked at by people frequently. I think the common helper method might be more complex than what we have here. This file rarely changes, these methods here haven't changed in forever. There was the previous JNI exception change in this file in 2017, affecting other methods. There are a couple of other changes in the file, also affecting other methods, and then it's the initial load in jdk8 in 2007 and probably they are the same before that. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14613#issuecomment-1603305305 From dholmes at openjdk.org Fri Jun 23 04:40:01 2023 From: dholmes at openjdk.org (David Holmes) Date: Fri, 23 Jun 2023 04:40:01 GMT Subject: jmx-dev RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks In-Reply-To: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> References: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> Message-ID: <-spoFoP1Jnd7kgwIOERocunOhrAr6INDRWMpHLqsoj0=.1eb7b43b-39d1-4095-adb2-5af41c23c083@github.com> On Thu, 22 Jun 2023 10:10:07 GMT, Kevin Walls wrote: > JNI calls were identified, where we do not check for a pending Exception afterwards. > > (JDK-8162530 cleaned up up some of these kind of issues some years back, but more were found.) > > I tested a code change to manually create an Exception before some of the new ExceptionCheck calls, and this is correctly recognised, we see an Exception thrown by the native getLastGcInfo0, e.g. > > java.lang.NullPointerException: XXX Test Exception > at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo0(Native Method) > at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo(GcInfoBuilder.java:77) > at jdk.management/com.sun.management.internal.GarbageCollectorExtImpl.getLastGcInfo(GarbageCollectorExtImpl.java:69) > at LastGCInfo.main(LastGCInfo.java:53) > at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) > at java.base/java.lang.reflect.Method.invoke(Method.java:580) > at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) > at java.base/java.lang.Thread.run(Thread.java:1570) > > Tested with all of test/jdk/com/sun/management including test/jdk/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java Seems fine to me. Thanks. ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14613#pullrequestreview-1494377907 From djelinski at openjdk.org Fri Jun 23 06:22:06 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 23 Jun 2023 06:22:06 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v6] In-Reply-To: References: Message-ID: On Thu, 22 Jun 2023 09:58:19 GMT, Daniel Jeli?ski wrote: >> Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: >> >> update > > make/modules/java.desktop/lib/Awt2dLibraries.gmk line 241: > >> 239: DISABLED_WARNINGS_gcc_OGLPaints.c := format-nonliteral, \ >> 240: DISABLED_WARNINGS_gcc_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \ >> 241: DISABLED_WARNINGS_gcc_X11SurfaceData.c := implicit-fallthrough pointer-to-int-cast, \ > > Suggestion: > > DISABLED_WARNINGS_gcc_GLXSurfaceData.c := unused-function, \ > DISABLED_WARNINGS_gcc_gtk2_interface.c := parentheses type-limits, \ > DISABLED_WARNINGS_gcc_gtk3_interface.c := parentheses type-limits unused-function, \ > DISABLED_WARNINGS_gcc_OGLBufImgOps.c := format-nonliteral, \ > DISABLED_WARNINGS_gcc_OGLPaints.c := format-nonliteral, \ > DISABLED_WARNINGS_gcc_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \ > DISABLED_WARNINGS_gcc_X11SurfaceData.c := implicit-fallthrough pointer-to-int-cast, \ Please remove the extra spaces. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1239364317 From asemenov at openjdk.org Fri Jun 23 08:03:45 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Fri, 23 Jun 2023 08:03:45 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v8] In-Reply-To: References: Message-ID: > When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". > They can be fixed with small changes. Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: update ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14033/files - new: https://git.openjdk.org/jdk/pull/14033/files/c4ca2205..92f629f7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14033&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14033&range=06-07 Stats: 7 lines in 1 file changed: 0 ins; 0 del; 7 mod Patch: https://git.openjdk.org/jdk/pull/14033.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14033/head:pull/14033 PR: https://git.openjdk.org/jdk/pull/14033 From asemenov at openjdk.org Fri Jun 23 08:09:05 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Fri, 23 Jun 2023 08:09:05 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v6] In-Reply-To: References: Message-ID: On Fri, 23 Jun 2023 06:19:31 GMT, Daniel Jeli?ski wrote: >> make/modules/java.desktop/lib/Awt2dLibraries.gmk line 241: >> >>> 239: DISABLED_WARNINGS_gcc_OGLPaints.c := format-nonliteral, \ >>> 240: DISABLED_WARNINGS_gcc_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \ >>> 241: DISABLED_WARNINGS_gcc_X11SurfaceData.c := implicit-fallthrough pointer-to-int-cast, \ >> >> Suggestion: >> >> DISABLED_WARNINGS_gcc_GLXSurfaceData.c := unused-function, \ >> DISABLED_WARNINGS_gcc_gtk2_interface.c := parentheses type-limits, \ >> DISABLED_WARNINGS_gcc_gtk3_interface.c := parentheses type-limits unused-function, \ >> DISABLED_WARNINGS_gcc_OGLBufImgOps.c := format-nonliteral, \ >> DISABLED_WARNINGS_gcc_OGLPaints.c := format-nonliteral, \ >> DISABLED_WARNINGS_gcc_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \ >> DISABLED_WARNINGS_gcc_X11SurfaceData.c := implicit-fallthrough pointer-to-int-cast, \ > > Please remove the extra spaces. Done. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14033#discussion_r1239506015 From djelinski at openjdk.org Fri Jun 23 08:27:04 2023 From: djelinski at openjdk.org (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Fri, 23 Jun 2023 08:27:04 GMT Subject: jmx-dev RFR: 8308286 Fix clang warnings in linux code [v8] In-Reply-To: References: Message-ID: <6Ii3MX8vMTxkr1M6OSPRK1MC3Mird6O_jeC6topuMdU=.e954d902-8b57-40bf-8fd9-9d88b82cd969@github.com> On Fri, 23 Jun 2023 08:03:45 GMT, Artem Semenov wrote: >> When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". >> They can be fixed with small changes. > > Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: > > update LGTM ------------- Marked as reviewed by djelinski (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14033#pullrequestreview-1494691850 From mchung at openjdk.org Fri Jun 23 16:48:05 2023 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 23 Jun 2023 16:48:05 GMT Subject: jmx-dev RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks In-Reply-To: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> References: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> Message-ID: <2QzgZXdspymrtX47C9RvNRfhX5TBtfP1dxCXw2mhjO0=.c8b509ab-a8b3-48f5-866a-70e3ca00ded8@github.com> On Thu, 22 Jun 2023 10:10:07 GMT, Kevin Walls wrote: > JNI calls were identified, where we do not check for a pending Exception afterwards. > > (JDK-8162530 cleaned up up some of these kind of issues some years back, but more were found.) > > I tested a code change to manually create an Exception before some of the new ExceptionCheck calls, and this is correctly recognised, we see an Exception thrown by the native getLastGcInfo0, e.g. > > java.lang.NullPointerException: XXX Test Exception > at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo0(Native Method) > at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo(GcInfoBuilder.java:77) > at jdk.management/com.sun.management.internal.GarbageCollectorExtImpl.getLastGcInfo(GarbageCollectorExtImpl.java:69) > at LastGCInfo.main(LastGCInfo.java:53) > at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) > at java.base/java.lang.reflect.Method.invoke(Method.java:580) > at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) > at java.base/java.lang.Thread.run(Thread.java:1570) > > Tested with all of test/jdk/com/sun/management including test/jdk/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java Marked as reviewed by mchung (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14613#pullrequestreview-1495483988 From kevinw at openjdk.org Fri Jun 23 17:42:02 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 23 Jun 2023 17:42:02 GMT Subject: jmx-dev RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks In-Reply-To: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> References: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> Message-ID: On Thu, 22 Jun 2023 10:10:07 GMT, Kevin Walls wrote: > JNI calls were identified, where we do not check for a pending Exception afterwards. > > (JDK-8162530 cleaned up up some of these kind of issues some years back, but more were found.) > > I tested a code change to manually create an Exception before some of the new ExceptionCheck calls, and this is correctly recognised, we see an Exception thrown by the native getLastGcInfo0, e.g. > > java.lang.NullPointerException: XXX Test Exception > at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo0(Native Method) > at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo(GcInfoBuilder.java:77) > at jdk.management/com.sun.management.internal.GarbageCollectorExtImpl.getLastGcInfo(GarbageCollectorExtImpl.java:69) > at LastGCInfo.main(LastGCInfo.java:53) > at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) > at java.base/java.lang.reflect.Method.invoke(Method.java:580) > at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) > at java.base/java.lang.Thread.run(Thread.java:1570) > > Tested with all of test/jdk/com/sun/management including test/jdk/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java Thanks David and Mandy for the Reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/14613#issuecomment-1604612071 From kevinw at openjdk.org Fri Jun 23 17:45:12 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 23 Jun 2023 17:45:12 GMT Subject: jmx-dev Integrated: 8310628: GcInfoBuilder.c missing JNI Exception checks In-Reply-To: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> References: <87ZNvqRyVQt6jH_m0k0e6rp3ZgtEqmsHucDrNz27DSA=.985f5cc9-8938-4f70-89fa-35c93cb6606f@github.com> Message-ID: On Thu, 22 Jun 2023 10:10:07 GMT, Kevin Walls wrote: > JNI calls were identified, where we do not check for a pending Exception afterwards. > > (JDK-8162530 cleaned up up some of these kind of issues some years back, but more were found.) > > I tested a code change to manually create an Exception before some of the new ExceptionCheck calls, and this is correctly recognised, we see an Exception thrown by the native getLastGcInfo0, e.g. > > java.lang.NullPointerException: XXX Test Exception > at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo0(Native Method) > at jdk.management/com.sun.management.internal.GcInfoBuilder.getLastGcInfo(GcInfoBuilder.java:77) > at jdk.management/com.sun.management.internal.GarbageCollectorExtImpl.getLastGcInfo(GarbageCollectorExtImpl.java:69) > at LastGCInfo.main(LastGCInfo.java:53) > at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) > at java.base/java.lang.reflect.Method.invoke(Method.java:580) > at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138) > at java.base/java.lang.Thread.run(Thread.java:1570) > > Tested with all of test/jdk/com/sun/management including test/jdk/com/sun/management/GarbageCollectorMXBean/LastGCInfo.java This pull request has now been integrated. Changeset: a9c0a0f6 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/a9c0a0f6b915f9ddaa97d83bad4f3c2b38810636 Stats: 29 lines in 1 file changed: 20 ins; 0 del; 9 mod 8310628: GcInfoBuilder.c missing JNI Exception checks Reviewed-by: mchung, dholmes ------------- PR: https://git.openjdk.org/jdk/pull/14613 From kevinw at openjdk.org Fri Jun 23 19:10:14 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 23 Jun 2023 19:10:14 GMT Subject: jmx-dev RFR: 8310816: GcInfoBuilder float/double signature mismatch Message-ID: <51x6x8swNwXsWnSxuskzLe3sF2x8Ke8rUmVA9pJXPBM=.868ffcd7-652a-4bff-9246-6c6e21f785d3@github.com> Simple typo in a signature which is passed to JNU_NewObjectByName. The method clearly intentds to pass Float, but uses Double. This code is probably not invoked, unless there is a GC MXBean with such fields. I see no straightforward way of testing this explicitly, but the change is tiny. All tests in test/jdk/com/sun/management still pass. ------------- Commit messages: - 8310816: GcInfoBuilder float/double signature mismatch Changes: https://git.openjdk.org/jdk/pull/14631/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14631&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8310816 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/14631.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14631/head:pull/14631 PR: https://git.openjdk.org/jdk/pull/14631 From mchung at openjdk.org Fri Jun 23 21:00:03 2023 From: mchung at openjdk.org (Mandy Chung) Date: Fri, 23 Jun 2023 21:00:03 GMT Subject: jmx-dev RFR: 8310816: GcInfoBuilder float/double signature mismatch In-Reply-To: <51x6x8swNwXsWnSxuskzLe3sF2x8Ke8rUmVA9pJXPBM=.868ffcd7-652a-4bff-9246-6c6e21f785d3@github.com> References: <51x6x8swNwXsWnSxuskzLe3sF2x8Ke8rUmVA9pJXPBM=.868ffcd7-652a-4bff-9246-6c6e21f785d3@github.com> Message-ID: On Fri, 23 Jun 2023 18:10:59 GMT, Kevin Walls wrote: > Simple typo in a signature which is passed to JNU_NewObjectByName. The method clearly intentds to pass Float, but uses Double. > > This code is probably not invoked, unless there is a GC MXBean with such fields. I see no straightforward way of testing this explicitly, but the change is tiny. > > All tests in test/jdk/com/sun/management still pass. Marked as reviewed by mchung (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14631#pullrequestreview-1496015078 From dholmes at openjdk.org Fri Jun 23 21:41:03 2023 From: dholmes at openjdk.org (David Holmes) Date: Fri, 23 Jun 2023 21:41:03 GMT Subject: jmx-dev RFR: 8310816: GcInfoBuilder float/double signature mismatch In-Reply-To: <51x6x8swNwXsWnSxuskzLe3sF2x8Ke8rUmVA9pJXPBM=.868ffcd7-652a-4bff-9246-6c6e21f785d3@github.com> References: <51x6x8swNwXsWnSxuskzLe3sF2x8Ke8rUmVA9pJXPBM=.868ffcd7-652a-4bff-9246-6c6e21f785d3@github.com> Message-ID: On Fri, 23 Jun 2023 18:10:59 GMT, Kevin Walls wrote: > Simple typo in a signature which is passed to JNU_NewObjectByName. The method clearly intentds to pass Float, but uses Double. > > This code is probably not invoked, unless there is a GC MXBean with such fields. I see no straightforward way of testing this explicitly, but the change is tiny. > > All tests in test/jdk/com/sun/management still pass. Seems an obvious copy'n'paste error, but would result in a null entry in the array. I can't figure out how this code is triggered by `getLastGcInfo0` so can't say how to test it either. Hard to imagine removing a null could cause a problem for code accessing the resulting array, so it seems safe in that regard. Thanks. ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14631#pullrequestreview-1496074434 From vsitnikov at openjdk.org Sat Jun 24 06:51:16 2023 From: vsitnikov at openjdk.org (Vladimir Sitnikov) Date: Sat, 24 Jun 2023 06:51:16 GMT Subject: jmx-dev RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2] In-Reply-To: References: Message-ID: <_N1D3JRNf6qFNvV8d2XZMdDWO7BC8pk58CR7fVNTDcM=.bad91d00-fd4e-4a16-a9fc-f274d38f213d@github.com> On Mon, 16 Jan 2023 16:50:06 GMT, Magnus Ihse Bursie wrote: >> [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729) was created in an attempt to remove all trailing whitespace from properties files, and enable a jcheck verification that they did not come back, similar to other source code. It turned out that this was not so simple, however, since trailing whitespace in values is actually significant in properties files. >> >> To address this, I have opened four bugs on different component teams to either remove the trailing significant whitespace (if it is there erroneously), or convert it to the unicode sequence `\u0020`: [JDK-8298042](https://bugs.openjdk.org/browse/JDK-8298042), [JDK-8298044](https://bugs.openjdk.org/browse/JDK-8298044), [JDK-8298045](https://bugs.openjdk.org/browse/JDK-8298045) and [JDK-8298046](https://bugs.openjdk.org/browse/JDK-8298046). >> >> That leaves all the other trailing spaces, in blank lines and in the end of comments. These serve no purpose and should just be removed, and is what this issue concerns. >> >> When this and the four "significant whitespace" bugs are all finally integrated, we can finally turn on the verification in jcheck for properties files as well. >> >> The changes in this PR is based on [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729), in #10792. I have restored all the "delete trailing whitespace" changes, except for those with significance. These changes were in turned created by running `find . -type f -iname "*.properties" | xargs gsed -i -e 's/[ \t]*$//'`. > > Magnus Ihse Bursie has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Merge branch 'master' into properties-eol-clean-safe > - 8298047: Remove all non-significant trailing whitespace from properties files I've posted the suggetion to add .editorconfig on ide-support-dev, however, the list does not seem to be active: https://mail.openjdk.org/pipermail/ide-support-dev/2023-June/000281.html ------------- PR Comment: https://git.openjdk.org/jdk/pull/11491#issuecomment-1605290913 From kevinw at openjdk.org Mon Jun 26 08:38:12 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 26 Jun 2023 08:38:12 GMT Subject: jmx-dev RFR: 8310816: GcInfoBuilder float/double signature mismatch In-Reply-To: <51x6x8swNwXsWnSxuskzLe3sF2x8Ke8rUmVA9pJXPBM=.868ffcd7-652a-4bff-9246-6c6e21f785d3@github.com> References: <51x6x8swNwXsWnSxuskzLe3sF2x8Ke8rUmVA9pJXPBM=.868ffcd7-652a-4bff-9246-6c6e21f785d3@github.com> Message-ID: On Fri, 23 Jun 2023 18:10:59 GMT, Kevin Walls wrote: > Simple typo in a signature which is passed to JNU_NewObjectByName. The method clearly intentds to pass Float, but uses Double. > > This code is probably not invoked, unless there is a GC MXBean with such fields. I see no straightforward way of testing this explicitly, but the change is tiny. > > All tests in test/jdk/com/sun/management still pass. Thanks! ------------- PR Comment: https://git.openjdk.org/jdk/pull/14631#issuecomment-1606975619 From kevinw at openjdk.org Mon Jun 26 08:38:13 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Mon, 26 Jun 2023 08:38:13 GMT Subject: jmx-dev Integrated: 8310816: GcInfoBuilder float/double signature mismatch In-Reply-To: <51x6x8swNwXsWnSxuskzLe3sF2x8Ke8rUmVA9pJXPBM=.868ffcd7-652a-4bff-9246-6c6e21f785d3@github.com> References: <51x6x8swNwXsWnSxuskzLe3sF2x8Ke8rUmVA9pJXPBM=.868ffcd7-652a-4bff-9246-6c6e21f785d3@github.com> Message-ID: On Fri, 23 Jun 2023 18:10:59 GMT, Kevin Walls wrote: > Simple typo in a signature which is passed to JNU_NewObjectByName. The method clearly intentds to pass Float, but uses Double. > > This code is probably not invoked, unless there is a GC MXBean with such fields. I see no straightforward way of testing this explicitly, but the change is tiny. > > All tests in test/jdk/com/sun/management still pass. This pull request has now been integrated. Changeset: a96e92c8 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/a96e92c83dd3cb36c10282724466e6d1339f58f6 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8310816: GcInfoBuilder float/double signature mismatch Reviewed-by: mchung, dholmes ------------- PR: https://git.openjdk.org/jdk/pull/14631 From erikj at openjdk.org Mon Jun 26 09:32:19 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Mon, 26 Jun 2023 09:32:19 GMT Subject: jmx-dev RFR: 8298047: Remove all non-significant trailing whitespace from properties files [v2] In-Reply-To: <_N1D3JRNf6qFNvV8d2XZMdDWO7BC8pk58CR7fVNTDcM=.bad91d00-fd4e-4a16-a9fc-f274d38f213d@github.com> References: <_N1D3JRNf6qFNvV8d2XZMdDWO7BC8pk58CR7fVNTDcM=.bad91d00-fd4e-4a16-a9fc-f274d38f213d@github.com> Message-ID: On Sat, 24 Jun 2023 06:47:48 GMT, Vladimir Sitnikov wrote: > I've posted the suggetion to add .editorconfig on ide-support-dev, however, the list does not seem to be active: https://mail.openjdk.org/pipermail/ide-support-dev/2023-June/000281.html I think that sounds like a reasonable idea. I'm not following that mailing list. I think you can just post a PR with your suggested contents and target build-dev (through the `build` label). I'm not familiar with this kind of file, so an explanation of which IDEs support it would be good to include. ------------- PR Comment: https://git.openjdk.org/jdk/pull/11491#issuecomment-1607073914 From lkorinth at openjdk.org Wed Jun 28 17:04:24 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 28 Jun 2023 17:04:24 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files Message-ID: Remove trailing "blank" lines in source files. I like to use global-whitespace-cleanup-mode, but I can not use it if the files are "dirty" to begin with. This fix will make more files "clean". I also considered adding a check for this in jcheck for Skara, however it seems jcheck code handling hunks does not track end-of-files. Thus I will only clean the files. The fix removes trailing lines matching ^[[:space:]]*$ in - *.java - *.cpp - *.hpp - *.c - *.h I have applied the following bash script to each file: file="$1" while [[ $(tail -n 1 "$file") =~ ^[[:space:]]*$ ]]; do truncate -s -1 "$file" done `git diff --ignore-space-change --ignore-blank-lines master` displays no changes `git diff --ignore-blank-lines master` displays one change ------------- Commit messages: - h - c - hpp - cpp - 8311043: Remove trailing blank lines in source files Changes: https://git.openjdk.org/jdk/pull/14698/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14698&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8311043 Stats: 4529 lines in 4382 files changed: 0 ins; 4529 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/14698.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14698/head:pull/14698 PR: https://git.openjdk.org/jdk/pull/14698 From erikj at openjdk.org Thu Jun 29 07:23:54 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 29 Jun 2023 07:23:54 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the files are "dirty" to begin with. This fix will make more files "clean". I also considered adding a check for this in jcheck for Skara, however it seems jcheck code handling hunks does not track end-of-files. Thus I will only clean the files. > > The fix removes trailing lines matching ^[[:space:]]*$ in > > - *.java > - *.cpp > - *.hpp > - *.c > - *.h > > I have applied the following bash script to each file: > > file="$1" > > while [[ $(tail -n 1 "$file") =~ ^[[:space:]]*$ ]]; do > truncate -s -1 "$file" > done > > `git diff --ignore-space-change --ignore-blank-lines master` displays no changes > `git diff --ignore-blank-lines master` displays one change Marked as reviewed by erikj (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14698#pullrequestreview-1504702261 From dholmes at openjdk.org Thu Jun 29 07:43:58 2023 From: dholmes at openjdk.org (David Holmes) Date: Thu, 29 Jun 2023 07:43:58 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the files are "dirty" to begin with. This fix will make more files "clean". I also considered adding a check for this in jcheck for Skara, however it seems jcheck code handling hunks does not track end-of-files. Thus I will only clean the files. > > The fix removes trailing lines matching ^[[:space:]]*$ in > > - *.java > - *.cpp > - *.hpp > - *.c > - *.h > > I have applied the following bash script to each file: > > file="$1" > > while [[ $(tail -n 1 "$file") =~ ^[[:space:]]*$ ]]; do > truncate -s -1 "$file" > done > > `git diff --ignore-space-change --ignore-blank-lines master` displays no changes > `git diff --ignore-blank-lines master` displays one change This seems to run contrary to the requirement that files end in a newline, which git will complain about if the newline is missing. It also seems far too large and disruptive. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1612567676 From erikj at openjdk.org Thu Jun 29 08:00:58 2023 From: erikj at openjdk.org (Erik Joelsson) Date: Thu, 29 Jun 2023 08:00:58 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Thu, 29 Jun 2023 07:41:11 GMT, David Holmes wrote: > This seems to run contrary to the requirement that files end in a newline, which git will complain about if the newline is missing. The patch is leaving exactly one newline at the end of the file. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1612588091 From lkorinth at openjdk.org Thu Jun 29 08:58:59 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 29 Jun 2023 08:58:59 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Thu, 29 Jun 2023 07:41:11 GMT, David Holmes wrote: > This seems to run contrary to the requirement that files end in a newline, which git will complain about if the newline is missing. > > It also seems far too large and disruptive. Do you still think it is too disruptive after Erik's explanation? I could split it in more reviews, but I thought that maybe it would just make the review harder. I was hoping the two `git diff` commands I gave in my first comment in combination with the clean script would make the change seem reviewable. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1612660457 From asemenov at openjdk.org Thu Jun 29 09:11:05 2023 From: asemenov at openjdk.org (Artem Semenov) Date: Thu, 29 Jun 2023 09:11:05 GMT Subject: jmx-dev Integrated: 8308286 Fix clang warnings in linux code In-Reply-To: References: Message-ID: On Wed, 17 May 2023 12:28:47 GMT, Artem Semenov wrote: > When using the clang compiler to build OpenJDk on Linux, we encounter various "warnings as errors". > They can be fixed with small changes. This pull request has now been integrated. Changeset: 98a954ee Author: Artem Semenov URL: https://git.openjdk.org/jdk/commit/98a954eebc4f97dd16cb89bd4f1122952c8482ca Stats: 20 lines in 6 files changed: 14 ins; 0 del; 6 mod 8308286: Fix clang warnings in linux code Reviewed-by: avu, djelinski ------------- PR: https://git.openjdk.org/jdk/pull/14033 From kevinw at openjdk.org Thu Jun 29 11:55:55 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 29 Jun 2023 11:55:55 GMT Subject: jmx-dev RFR: 8311000: missing @since info in jdk.management Message-ID: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> Simple addition of a doc tag. src/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java is introduced in jdk7 by 7036199: Adding a notification to the implementation of GarbageCollectorMXBeans ------------- Commit messages: - 8311000: missing @since info in jdk.management Changes: https://git.openjdk.org/jdk/pull/14708/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14708&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8311000 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/14708.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14708/head:pull/14708 PR: https://git.openjdk.org/jdk/pull/14708 From coleenp at openjdk.org Thu Jun 29 12:03:56 2023 From: coleenp at openjdk.org (Coleen Phillimore) Date: Thu, 29 Jun 2023 12:03:56 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the files are "dirty" to begin with. This fix will make more files "clean". I also considered adding a check for this in jcheck for Skara, however it seems jcheck code handling hunks does not track end-of-files. Thus I will only clean the files. > > The fix removes trailing lines matching ^[[:space:]]*$ in > > - *.java > - *.cpp > - *.hpp > - *.c > - *.h > > I have applied the following bash script to each file: > > file="$1" > > while [[ $(tail -n 1 "$file") =~ ^[[:space:]]*$ ]]; do > truncate -s -1 "$file" > done > > `git diff --ignore-space-change --ignore-blank-lines master` displays no changes > `git diff --ignore-blank-lines master` displays one change Why do we care about this? ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1613018234 From dholmes at openjdk.org Thu Jun 29 12:14:55 2023 From: dholmes at openjdk.org (David Holmes) Date: Thu, 29 Jun 2023 12:14:55 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: <3rq9p7Pqn9UcVlQ5E0XMltGBBgmpWeLiz0k7HDi53qE=.fa670ef1-cd6c-4e4a-9ec3-89d5a2fec0ef@github.com> On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the files are "dirty" to begin with. This fix will make more files "clean". I also considered adding a check for this in jcheck for Skara, however it seems jcheck code handling hunks does not track end-of-files. Thus I will only clean the files. > > The fix removes trailing lines matching ^[[:space:]]*$ in > > - *.java > - *.cpp > - *.hpp > - *.c > - *.h > > I have applied the following bash script to each file: > > file="$1" > > while [[ $(tail -n 1 "$file") =~ ^[[:space:]]*$ ]]; do > truncate -s -1 "$file" > done > > `git diff --ignore-space-change --ignore-blank-lines master` displays no changes > `git diff --ignore-blank-lines master` displays one change Neither the PR diffs nor the webrev make it easy to see exactly what is being changed here. It appeared to me that the last empty line of each file was being deleted, leaving no newline at the end. But to me this is too disruptive with no tangible benefit. And you need buy-in from all the different areas affected by this. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1613043398 From lkorinth at openjdk.org Thu Jun 29 12:38:57 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 29 Jun 2023 12:38:57 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Thu, 29 Jun 2023 12:01:03 GMT, Coleen Phillimore wrote: > Why do we care about this? I care because of global-whitespace-cleanup-mode (in emacs). It helps me remove trailing whitespaces and blanklines when saving but it will not fix a file that was "dirty" when it was opened. Trailing blank lines triggers it not to clean whitespaces for me. And it does not look good. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1613095390 From coleenp at openjdk.org Thu Jun 29 12:42:56 2023 From: coleenp at openjdk.org (Coleen Phillimore) Date: Thu, 29 Jun 2023 12:42:56 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the files are "dirty" to begin with. This fix will make more files "clean". I also considered adding a check for this in jcheck for Skara, however it seems jcheck code handling hunks does not track end-of-files. Thus I will only clean the files. > > The fix removes trailing lines matching ^[[:space:]]*$ in > > - *.java > - *.cpp > - *.hpp > - *.c > - *.h > > I have applied the following bash script to each file: > > file="$1" > > while [[ $(tail -n 1 "$file") =~ ^[[:space:]]*$ ]]; do > truncate -s -1 "$file" > done > > `git diff --ignore-space-change --ignore-blank-lines master` displays no changes > `git diff --ignore-blank-lines master` displays one change You could fix your emacs functions. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1613106245 From lkorinth at openjdk.org Thu Jun 29 13:08:59 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 29 Jun 2023 13:08:59 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: <3rq9p7Pqn9UcVlQ5E0XMltGBBgmpWeLiz0k7HDi53qE=.fa670ef1-cd6c-4e4a-9ec3-89d5a2fec0ef@github.com> References: <3rq9p7Pqn9UcVlQ5E0XMltGBBgmpWeLiz0k7HDi53qE=.fa670ef1-cd6c-4e4a-9ec3-89d5a2fec0ef@github.com> Message-ID: On Thu, 29 Jun 2023 12:11:40 GMT, David Holmes wrote: > Neither the PR diffs nor the webrev make it easy to see exactly what is being changed here. It appeared to me that the last empty line of each file was being deleted, leaving no newline at the end. My changes look like this in the diff output } - Removal of the last newline would look like this: -} +} \ No newline at end of file (both with `git diff` and `git diff --unified`) I have not tested if this is also true for the generated webrevs, but I think that is precisely how they are created. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1613152641 From lkorinth at openjdk.org Thu Jun 29 14:12:55 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 29 Jun 2023 14:12:55 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Thu, 29 Jun 2023 12:40:34 GMT, Coleen Phillimore wrote: > You could fix your emacs functions. It is a *very nice* feature of global-whitespace-cleanup-mode ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1613252347 From coleenp at openjdk.org Thu Jun 29 15:46:57 2023 From: coleenp at openjdk.org (Coleen Phillimore) Date: Thu, 29 Jun 2023 15:46:57 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the files are "dirty" to begin with. This fix will make more files "clean". I also considered adding a check for this in jcheck for Skara, however it seems jcheck code handling hunks does not track end-of-files. Thus I will only clean the files. > > The fix removes trailing lines matching ^[[:space:]]*$ in > > - *.java > - *.cpp > - *.hpp > - *.c > - *.h > > I have applied the following bash script to each file: > > file="$1" > > while [[ $(tail -n 1 "$file") =~ ^[[:space:]]*$ ]]; do > truncate -s -1 "$file" > done > > `git diff --ignore-space-change --ignore-blank-lines master` displays no changes > `git diff --ignore-blank-lines master` displays one change Per had an emacs feature to remove whitespaces at the end of the line, and gave me the vim version of that. That's a nice feature. I object to this change. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1613437709 From rriggs at openjdk.org Thu Jun 29 16:16:56 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 29 Jun 2023 16:16:56 GMT Subject: jmx-dev RFR: 8311000: missing @since info in jdk.management In-Reply-To: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> References: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> Message-ID: On Thu, 29 Jun 2023 11:48:43 GMT, Kevin Walls wrote: > Simple addition of a doc tag. > > src/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java is introduced in jdk7 by > 7036199: Adding a notification to the implementation of GarbageCollectorMXBeans Marked as reviewed by rriggs (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14708#pullrequestreview-1505663793 From kevinw at openjdk.org Thu Jun 29 16:19:04 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 29 Jun 2023 16:19:04 GMT Subject: jmx-dev RFR: 8310988: Missing @since tags in java.management.rmi Message-ID: Simple doc tag addition. These are files which describe an interface that has been with us since 1.5. The files themselves were previously generated at build time, but have been in the repo since jdk15. But the API is since 1.5. The other file mentioned in the bug is not a public class and has no javadoc generated, ignoring that one. ------------- Commit messages: - 8310988: Missing @since tags in java.management.rmi Changes: https://git.openjdk.org/jdk/pull/14714/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14714&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8310988 Stats: 4 lines in 2 files changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/14714.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14714/head:pull/14714 PR: https://git.openjdk.org/jdk/pull/14714 From rriggs at openjdk.org Thu Jun 29 16:19:05 2023 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 29 Jun 2023 16:19:05 GMT Subject: jmx-dev RFR: 8310988: Missing @since tags in java.management.rmi In-Reply-To: References: Message-ID: On Thu, 29 Jun 2023 16:08:15 GMT, Kevin Walls wrote: > Simple doc tag addition. > > These are files which describe an interface that has been with us since 1.5. The files themselves were previously generated at build time, but have been in the repo since jdk15. But the API is since 1.5. > > The other file mentioned in the bug is not a public class and has no javadoc generated, ignoring that one. Marked as reviewed by rriggs (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14714#pullrequestreview-1505664161 From alanb at openjdk.org Thu Jun 29 16:25:54 2023 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 29 Jun 2023 16:25:54 GMT Subject: jmx-dev RFR: 8310988: Missing @since tags in java.management.rmi In-Reply-To: References: Message-ID: On Thu, 29 Jun 2023 16:08:15 GMT, Kevin Walls wrote: > Simple doc tag addition. > > These are files which describe an interface that has been with us since 1.5. The files themselves were previously generated at build time, but have been in the repo since jdk15. But the API is since 1.5. > > The other file mentioned in the bug is not a public class and has no javadoc generated, ignoring that one. Looks fine, I assume you'll bump the copyright date before integrating. Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14714#pullrequestreview-1505676832 PR Review: https://git.openjdk.org/jdk/pull/14714#pullrequestreview-1505677062 From kevinw at openjdk.org Thu Jun 29 16:33:54 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Thu, 29 Jun 2023 16:33:54 GMT Subject: jmx-dev RFR: 8310988: Missing @since tags in java.management.rmi In-Reply-To: References: Message-ID: <2FQFhcetZQpuGxs636oYw_toe3BlsHGOq3a8QHzwKyI=.00bca7d5-a6b7-407e-9edd-3e6468852aa5@github.com> On Thu, 29 Jun 2023 16:22:29 GMT, Alan Bateman wrote: > Looks fine, I assume you'll bump the copyright date before integrating. Will do. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14714#issuecomment-1613500142 From lkorinth at openjdk.org Thu Jun 29 16:55:05 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 29 Jun 2023 16:55:05 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the files are "dirty" to begin with. This fix will make more files "clean". I also considered adding a check for this in jcheck for Skara, however it seems jcheck code handling hunks does not track end-of-files. Thus I will only clean the files. > > The fix removes trailing lines matching ^[[:space:]]*$ in > > - *.java > - *.cpp > - *.hpp > - *.c > - *.h > > I have applied the following bash script to each file: > > file="$1" > > while [[ $(tail -n 1 "$file") =~ ^[[:space:]]*$ ]]; do > truncate -s -1 "$file" > done > > `git diff --ignore-space-change --ignore-blank-lines master` displays no changes > `git diff --ignore-blank-lines master` displays one change This was not liked, I will close it. I will possibly do it under another PR for the GC code. Thanks for reviewing. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1613526703 From lkorinth at openjdk.org Thu Jun 29 16:55:06 2023 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 29 Jun 2023 16:55:06 GMT Subject: jmx-dev Withdrawn: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the files are "dirty" to begin with. This fix will make more files "clean". I also considered adding a check for this in jcheck for Skara, however it seems jcheck code handling hunks does not track end-of-files. Thus I will only clean the files. > > The fix removes trailing lines matching ^[[:space:]]*$ in > > - *.java > - *.cpp > - *.hpp > - *.c > - *.h > > I have applied the following bash script to each file: > > file="$1" > > while [[ $(tail -n 1 "$file") =~ ^[[:space:]]*$ ]]; do > truncate -s -1 "$file" > done > > `git diff --ignore-space-change --ignore-blank-lines master` displays no changes > `git diff --ignore-blank-lines master` displays one change This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/14698 From jjg at openjdk.org Thu Jun 29 17:24:54 2023 From: jjg at openjdk.org (Jonathan Gibbons) Date: Thu, 29 Jun 2023 17:24:54 GMT Subject: jmx-dev RFR: 8310988: Missing @since tags in java.management.rmi In-Reply-To: References: Message-ID: On Thu, 29 Jun 2023 16:08:15 GMT, Kevin Walls wrote: > Simple doc tag addition. > > These are files which describe an interface that has been with us since 1.5. The files themselves were previously generated at build time, but have been in the repo since jdk15. But the API is since 1.5. > > The other file mentioned in the bug is not a public class and has no javadoc generated, ignoring that one. Marked as reviewed by jjg (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14714#pullrequestreview-1505775865 From dholmes at openjdk.org Fri Jun 30 01:24:05 2023 From: dholmes at openjdk.org (David Holmes) Date: Fri, 30 Jun 2023 01:24:05 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: <3rq9p7Pqn9UcVlQ5E0XMltGBBgmpWeLiz0k7HDi53qE=.fa670ef1-cd6c-4e4a-9ec3-89d5a2fec0ef@github.com> Message-ID: On Thu, 29 Jun 2023 13:05:58 GMT, Leo Korinth wrote: > My changes look like this in the diff output > ``` > } > - > ``` Thanks for showing this and other output. To me this looked like the final newline had been removed. I would have expected to see something that more obviously showed more than one blank line before hand and exactly one after. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1613985636 From mli at openjdk.org Fri Jun 30 06:40:52 2023 From: mli at openjdk.org (Hamlin Li) Date: Fri, 30 Jun 2023 06:40:52 GMT Subject: jmx-dev RFR: 8310988: Missing @since tags in java.management.rmi In-Reply-To: References: Message-ID: On Thu, 29 Jun 2023 16:08:15 GMT, Kevin Walls wrote: > Simple doc tag addition. > > These are files which describe an interface that has been with us since 1.5. The files themselves were previously generated at build time, but have been in the repo since jdk15. But the API is since 1.5. > > The other file mentioned in the bug is not a public class and has no javadoc generated, ignoring that one. Marked as reviewed by mli (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14714#pullrequestreview-1506598416 From mli at openjdk.org Fri Jun 30 06:43:53 2023 From: mli at openjdk.org (Hamlin Li) Date: Fri, 30 Jun 2023 06:43:53 GMT Subject: jmx-dev RFR: 8311000: missing @since info in jdk.management In-Reply-To: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> References: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> Message-ID: On Thu, 29 Jun 2023 11:48:43 GMT, Kevin Walls wrote: > Simple addition of a doc tag. > > src/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java is introduced in jdk7 by > 7036199: Adding a notification to the implementation of GarbageCollectorMXBeans Marked as reviewed by mli (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/14708#pullrequestreview-1506600934 From kevinw at openjdk.org Fri Jun 30 08:32:24 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 30 Jun 2023 08:32:24 GMT Subject: jmx-dev RFR: 8310988: Missing @since tags in java.management.rmi [v2] In-Reply-To: References: Message-ID: > Simple doc tag addition. > > These are files which describe an interface that has been with us since 1.5. The files themselves were previously generated at build time, but have been in the repo since jdk15. But the API is since 1.5. > > The other file mentioned in the bug is not a public class and has no javadoc generated, ignoring that one. Kevin Walls has updated the pull request incrementally with two additional commits since the last revision: - (C) - (C) ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14714/files - new: https://git.openjdk.org/jdk/pull/14714/files/5bc9cc12..634cc78d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14714&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14714&range=00-01 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/14714.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14714/head:pull/14714 PR: https://git.openjdk.org/jdk/pull/14714 From kevinw at openjdk.org Fri Jun 30 08:32:24 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 30 Jun 2023 08:32:24 GMT Subject: jmx-dev RFR: 8310988: Missing @since tags in java.management.rmi In-Reply-To: References: Message-ID: On Thu, 29 Jun 2023 16:08:15 GMT, Kevin Walls wrote: > Simple doc tag addition. > > These are files which describe an interface that has been with us since 1.5. The files themselves were previously generated at build time, but have been in the repo since jdk15. But the API is since 1.5. > > The other file mentioned in the bug is not a public class and has no javadoc generated, ignoring that one. Thanks for the reviews! ------------- PR Comment: https://git.openjdk.org/jdk/pull/14714#issuecomment-1614310538 From kevinw at openjdk.org Fri Jun 30 08:32:25 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 30 Jun 2023 08:32:25 GMT Subject: jmx-dev Integrated: 8310988: Missing @since tags in java.management.rmi In-Reply-To: References: Message-ID: <3YDYDbkf6uPkDDlVgZa7IwRs9lL_AQzunJdcMutZItk=.6c343633-1e9c-4cff-9a6e-14ab5b4bcdf9@github.com> On Thu, 29 Jun 2023 16:08:15 GMT, Kevin Walls wrote: > Simple doc tag addition. > > These are files which describe an interface that has been with us since 1.5. The files themselves were previously generated at build time, but have been in the repo since jdk15. But the API is since 1.5. > > The other file mentioned in the bug is not a public class and has no javadoc generated, ignoring that one. This pull request has now been integrated. Changeset: 660cd256 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/660cd256b72154b966208174dbf9abe95c9bfd60 Stats: 6 lines in 2 files changed: 4 ins; 0 del; 2 mod 8310988: Missing @since tags in java.management.rmi Reviewed-by: rriggs, alanb, jjg, mli ------------- PR: https://git.openjdk.org/jdk/pull/14714 From kevinw at openjdk.org Fri Jun 30 08:33:16 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 30 Jun 2023 08:33:16 GMT Subject: jmx-dev RFR: 8311000: missing @since info in jdk.management In-Reply-To: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> References: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> Message-ID: <2pkOjrEAiB-srGOy0Rpk9gDvexvUPQK2FdVPdjzwMvE=.1b80be8e-0134-4b75-8d64-08b726c738eb@github.com> On Thu, 29 Jun 2023 11:48:43 GMT, Kevin Walls wrote: > Simple addition of a doc tag. > > src/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java is introduced in jdk7 by > 7036199: Adding a notification to the implementation of GarbageCollectorMXBeans Thanks for the reviews. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14708#issuecomment-1614313233 From kevinw at openjdk.org Fri Jun 30 08:33:17 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 30 Jun 2023 08:33:17 GMT Subject: jmx-dev Integrated: 8311000: missing @since info in jdk.management In-Reply-To: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> References: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> Message-ID: On Thu, 29 Jun 2023 11:48:43 GMT, Kevin Walls wrote: > Simple addition of a doc tag. > > src/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java is introduced in jdk7 by > 7036199: Adding a notification to the implementation of GarbageCollectorMXBeans This pull request has now been integrated. Changeset: c08c9831 Author: Kevin Walls URL: https://git.openjdk.org/jdk/commit/c08c9831df2428e9d083a56eda5ebf00623ba961 Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod 8311000: missing @since info in jdk.management Reviewed-by: rriggs, mli ------------- PR: https://git.openjdk.org/jdk/pull/14708 From kevinw at openjdk.org Fri Jun 30 08:33:14 2023 From: kevinw at openjdk.org (Kevin Walls) Date: Fri, 30 Jun 2023 08:33:14 GMT Subject: jmx-dev RFR: 8311000: missing @since info in jdk.management [v2] In-Reply-To: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> References: <-f8oRj4ThTKK-rAY9GnVSGlXrPLuIVcuz40dJBaFsF8=.fd87ccc0-858a-4e14-b2a4-d666faf1aa98@github.com> Message-ID: <8o6HPClQN-coLysy8Ahxm0wl3Rxuwimprqoia-rNr60=.0b166d74-dd7d-4687-be17-8e1a3cde7a8d@github.com> > Simple addition of a doc tag. > > src/share/classes/com/sun/management/GarbageCollectionNotificationInfo.java is introduced in jdk7 by > 7036199: Adding a notification to the implementation of GarbageCollectorMXBeans Kevin Walls has updated the pull request incrementally with one additional commit since the last revision: (C) ------------- Changes: - all: https://git.openjdk.org/jdk/pull/14708/files - new: https://git.openjdk.org/jdk/pull/14708/files/b4c36af7..30632c98 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=14708&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14708&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/14708.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/14708/head:pull/14708 PR: https://git.openjdk.org/jdk/pull/14708 From dcubed at openjdk.org Fri Jun 30 15:21:10 2023 From: dcubed at openjdk.org (Daniel D. Daugherty) Date: Fri, 30 Jun 2023 15:21:10 GMT Subject: jmx-dev RFR: 8311043: Remove trailing blank lines in source files In-Reply-To: References: Message-ID: <1HPsLLkrre-aTNkUCrJ2Os1Ba20NZW-s3bYL1nJU17Q=.47ea0d5b-f382-48a5-ba1b-957a003277d6@github.com> On Wed, 28 Jun 2023 16:54:51 GMT, Leo Korinth wrote: > Remove trailing "blank" lines in source files. > > I like to use global-whitespace-cleanup-mode, but I can not use it if the files are "dirty" to begin with. This fix will make more files "clean". I also considered adding a check for this in jcheck for Skara, however it seems jcheck code handling hunks does not track end-of-files. Thus I will only clean the files. > > The fix removes trailing lines matching ^[[:space:]]*$ in > > - *.java > - *.cpp > - *.hpp > - *.c > - *.h > > I have applied the following bash script to each file: > > file="$1" > > while [[ $(tail -n 1 "$file") =~ ^[[:space:]]*$ ]]; do > truncate -s -1 "$file" > done > > `git diff --ignore-space-change --ignore-blank-lines master` displays no changes > `git diff --ignore-blank-lines master` displays one change Ending the file with a blank line? I would not have expected that at all. I expect a single EOL at the end of the file; from a visual POV, the last line of non-blank text ends with an EOL. No more, no less. ------------- PR Comment: https://git.openjdk.org/jdk/pull/14698#issuecomment-1614806396