Re: RFR: 8268764: Use Long.hashCode() instead of int-cast where applicable [v4]

2021-10-12 Thread Sergey Bylokhov
On Thu, 1 Jul 2021 12:19:53 GMT, Сергей Цыпанов wrote: >> In some JDK classes there's still the following hashCode() implementation: >> >> long objNum; >> >> public int hashCode() { >> return (int) objNum; >> } >> >> This outdated expression should be replaced with Long.hashCode(long) as i

Re: RFR: JDK-8274977: Remove expandPacked and extendEdge from awt_ImagingLib.c

2021-10-12 Thread Matthias Baesken
On Tue, 12 Oct 2021 06:10:17 GMT, Sergey Bylokhov wrote: > > both functions expandPacked and extendEdge are already unused/unreferenced > > in jdk11u. So I wonder what usages are planned for them and when. > > It is necessary to dig into the history of this file, and related bugs in JBS > to s

Re: RFR: 8275106: Cleanup Iterator usages in java.desktop

2021-10-12 Thread Sergey Bylokhov
On Fri, 8 Oct 2021 19:37:35 GMT, Andrey Turbanov wrote: > Cycles with 'Iterator' are error-prone. It's better to use more high-level > code, which easier to read. > We can use enhanced-for or Collection.removeIf src/java.desktop/share/classes/javax/swing/JDesktopPane.java line 330: > 328:

Re: RFR: 8275106: Cleanup Iterator usages in java.desktop

2021-10-12 Thread Andrey Turbanov
On Tue, 12 Oct 2021 05:49:17 GMT, Sergey Bylokhov wrote: >> Cycles with 'Iterator' are error-prone. It's better to use more high-level >> code, which easier to read. >> We can use enhanced-for or Collection.removeIf > > src/java.desktop/unix/classes/sun/awt/X11/ListHelper.java line 569: > >> 56

RFR: 8275106: Cleanup Iterator usages in java.desktop

2021-10-12 Thread Andrey Turbanov
Cycles with 'Iterator' are error-prone. It's better to use more high-level code, which easier to read. We can use enhanced-for or Collection.removeIf - Commit messages: - [PATCH] Cleanup Iterator usages in java.desktop - [PATCH] Cleanup Iterator usages in java.desktop Changes: htt

RFR: 8275131: Exceptions after a touchpad gesture on macOS

2021-10-12 Thread Dmitry Batrak
This is a small fix for a mistake in JDK-8257853 implementation, replacing DECLARE_METHOD JNI lookup macro with DECLARE_STATIC_METHOD in [AWTWindow_Normal postGesture:as:a🅱]. I did not created a test for the fix, as AWT Robot doesn't currently support touchpad gestures. - Commit me

Re: RFR: 8269698: Specification for methods of java.awt.im.InputContext should mention that they do nothing [v3]

2021-10-12 Thread Alexander Zvegintsev
> This fix simply describes that the `java.awt.im.InputContext` is a dummy > implementation, which may not conform its spec. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: use Objects.requireNonNull - Changes:

Re: RFR: 8269698: Specification for methods of java.awt.im.InputContext should mention that they do nothing [v2]

2021-10-12 Thread Alexander Zvegintsev
On Tue, 12 Oct 2021 06:07:53 GMT, Sergey Bylokhov wrote: >> Alexander Zvegintsev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> throw exceptions instead of doc change > > src/java.desktop/share/classes/java/awt/im/InputContext.java line

Re: RFR: 8275131: Exceptions after a touchpad gesture on macOS

2021-10-12 Thread Dmitry Markov
On Tue, 12 Oct 2021 12:23:02 GMT, Dmitry Batrak wrote: > This is a small fix for a mistake in JDK-8257853 implementation, replacing > DECLARE_METHOD JNI lookup macro with DECLARE_STATIC_METHOD in > [AWTWindow_Normal postGesture:as:a🅱]. > I did not created a test for the fix, as AWT Robot doesn'

Integrated: 8275131: Exceptions after a touchpad gesture on macOS

2021-10-12 Thread Dmitry Batrak
On Tue, 12 Oct 2021 12:23:02 GMT, Dmitry Batrak wrote: > This is a small fix for a mistake in JDK-8257853 implementation, replacing > DECLARE_METHOD JNI lookup macro with DECLARE_STATIC_METHOD in > [AWTWindow_Normal postGesture:as:a🅱]. > I did not created a test for the fix, as AWT Robot doesn'

Re: RFR: 8275131: Exceptions after a touchpad gesture on macOS

2021-10-12 Thread Phil Race
On Tue, 12 Oct 2021 12:23:02 GMT, Dmitry Batrak wrote: > This is a small fix for a mistake in JDK-8257853 implementation, replacing > DECLARE_METHOD JNI lookup macro with DECLARE_STATIC_METHOD in > [AWTWindow_Normal postGesture:as:a🅱]. > I did not created a test for the fix, as AWT Robot doesn'

Integrated: 8268764: Use Long.hashCode() instead of int-cast where applicable

2021-10-12 Thread Сергей Цыпанов
On Tue, 15 Jun 2021 12:15:11 GMT, Сергей Цыпанов wrote: > In some JDK classes there's still the following hashCode() implementation: > > long objNum; > > public int hashCode() { > return (int) objNum; > } > > This outdated expression should be replaced with Long.hashCode(long) as it > > -

Re: RFR: 8269698: Specification for methods of java.awt.im.InputContext should mention that they do nothing [v3]

2021-10-12 Thread Sergey Bylokhov
On Tue, 12 Oct 2021 13:39:21 GMT, Alexander Zvegintsev wrote: >> This fix simply describes that the `java.awt.im.InputContext` is a dummy >> implementation, which may not conform its spec. > > Alexander Zvegintsev has updated the pull request incrementally with one > additional commit since th

Re: RFR: 8275106: Cleanup Iterator usages in java.desktop

2021-10-12 Thread Sergey Bylokhov
On Fri, 8 Oct 2021 19:37:35 GMT, Andrey Turbanov wrote: > Cycles with 'Iterator' are error-prone. It's better to use more high-level > code, which easier to read. > We can use enhanced-for or Collection.removeIf Marked as reviewed by serb (Reviewer). - PR: https://git.openjdk.java

Re: RFR: JDK-8274977: Remove expandPacked and extendEdge from awt_ImagingLib.c

2021-10-12 Thread Sergey Bylokhov
On Fri, 8 Oct 2021 14:25:18 GMT, Matthias Baesken wrote: > Please review this small cleanup change. > Looks like expandPacked and extendEdge from awt_ImagingLib.c are > unreferenced/unused and can be removed. > > Thanks, Matthias You do not need to search the names of two functions it is unlik