RFR: 8348170: Unnecessary Hashtable usage in CSS.styleConstantToCssMap

2025-01-21 Thread Andrey Turbanov
There is a field `javax.swing.text.html.CSS#styleConstantToCssMap` which uses legacy `Hashtable` class. As this map is read-only and all its content is initialized in `` we can safely use immutable `Map` instead. - Commit messages: - [PATCH] Unnecessary Hashtable usage in CSS.style

Integrated: 8347916: Simplify javax.swing.text.html.CSS.LengthUnit.getValue

2025-01-20 Thread Andrey Turbanov
On Fri, 1 Nov 2024 14:43:39 GMT, Andrey Turbanov wrote: > Static and non-static `CSS.LengthUnit.getValue` methods essentially do the > same thing. > https://github.com/openjdk/jdk/blob/751a914b0a377d4e1dd30d2501f0ab4e327dea34/src/java.desktop/share/classes/javax/swing/text/html/CSS.j

Re: RFR: 8347916: Simplify javax.swing.text.html.CSS.LengthUnit.getValue

2025-01-20 Thread Andrey Turbanov
On Fri, 1 Nov 2024 14:43:39 GMT, Andrey Turbanov wrote: > Static and non-static `CSS.LengthUnit.getValue` methods essentially do the > same thing. > https://github.com/openjdk/jdk/blob/751a914b0a377d4e1dd30d2501f0ab4e327dea34/src/java.desktop/share/classes/javax/swing/text/html/CSS.j

RFR: 8347916: Simplify javax.swing.text.html.CSS.LengthUnit.getValue

2025-01-16 Thread Andrey Turbanov
Static and non-static `CSS.LengthUnit.getValue` methods essentially do the same thing. https://github.com/openjdk/jdk/blob/751a914b0a377d4e1dd30d2501f0ab4e327dea34/src/java.desktop/share/classes/javax/swing/text/html/CSS.java#L3085-L3096 https://github.com/openjdk/jdk/blob/751a914b0a377d4e1dd30d2

Integrated: 8347370: Unnecessary Hashtable usage in javax.swing.text.html.HTML

2025-01-16 Thread Andrey Turbanov
On Fri, 1 Nov 2024 20:13:31 GMT, Andrey Turbanov wrote: > The Hashtable `javax.swing.text.html.HTML.scMapping` is modified only within > `` block. > We can replace it with immutable map to avoid Hashtable synchronization > overhead. This pull request has now been integrated

RFR: 8347370: Unnecessary Hashtable usage in javax.swing.text.html.HTML

2025-01-09 Thread Andrey Turbanov
The Hashtable `javax.swing.text.html.HTML.scMapping` is modified only within `` block. We can replace it with immutable map to avoid Hashtable synchronization overhead. - Commit messages: - 8347370 update copyright year - [PATCH] Unnecessary Hashtable usage in javax.swing.text.htm

Re: RFR: 8346036: Unnecessary Hashtable usage in javax.swing.text.html.parser.Entity

2025-01-09 Thread Andrey Turbanov
On Fri, 1 Nov 2024 14:02:52 GMT, Andrey Turbanov wrote: > The Hashtable `javax.swing.text.html.parser.Entity#entityTypes` is modified > only within `` block. > We can replace it with immutable map to avoid Hashtable synchronization > overhead. > Similar to what we did in #21825.

Integrated: 8346036: Unnecessary Hashtable usage in javax.swing.text.html.parser.Entity

2025-01-09 Thread Andrey Turbanov
On Fri, 1 Nov 2024 14:02:52 GMT, Andrey Turbanov wrote: > The Hashtable `javax.swing.text.html.parser.Entity#entityTypes` is modified > only within `` block. > We can replace it with immutable map to avoid Hashtable synchronization > overhead. > Similar to what we did in #21

Re: RFR: 8345538: Robot.mouseMove doesn't clamp bounds on macOS when trying to move mouse off screen [v3]

2024-12-19 Thread Andrey Turbanov
On Tue, 17 Dec 2024 20:46:54 GMT, Alisen Chung wrote: >> Currently on macOS when mouseMove is given an offscreen coordinate to move >> the mouse to, mouseMove will physically clamp to the edge of the screen, but >> if you try to grab the mouse location immediately after by using >> MouseInfo.g

RFR: 8346603: Cleanup Metacity.ThemeGetter class

2024-12-19 Thread Andrey Turbanov
There is opportunity to remove redundant nested class `Metacity.ThemeGetter`. It was introduced in the SecurityManager era to handle privileged call. Now it's not the case and we can remove it. It simplifies and streamlines logic. - Commit messages: - [PATCH] Cleanup Metacity.Theme

RFR: 8346036: Unnecessary Hashtable usage in javax.swing.text.html.parser.Entity

2024-12-11 Thread Andrey Turbanov
The Hashtable `javax.swing.text.html.parser.Entity#entityTypes` is modified only within `` block. We can replace it with immutable map to avoid Hashtable synchronization overhead. - Commit messages: - [PATCH] Unnecessary Hashtable usage in javax.swing.text.html.parser.Entity Chang

Integrated: 8345616: Unnecessary Hashtable usage in javax.swing.text.html.parser.Element

2024-12-11 Thread Andrey Turbanov
On Fri, 1 Nov 2024 13:32:07 GMT, Andrey Turbanov wrote: > The Hashtable `javax.swing.text.html.parser.Element#contentTypes` is > initialized only within `` block. > We can replace it with immutable map to avoid Hashtable `synchronized` > overhead. This pull request has now bee

Re: RFR: 8345616: Unnecessary Hashtable usage in javax.swing.text.html.parser.Element

2024-12-11 Thread Andrey Turbanov
On Fri, 1 Nov 2024 13:32:07 GMT, Andrey Turbanov wrote: > The Hashtable `javax.swing.text.html.parser.Element#contentTypes` is > initialized only within `` block. > We can replace it with immutable map to avoid Hashtable `synchronized` > overhead. Can I get a second re

RFR: 8345616: Unnecessary Hashtable usage in javax.swing.text.html.parser.Element

2024-12-05 Thread Andrey Turbanov
The Hashtable `javax.swing.text.html.parser.Element#contentTypes` is initialized only within `` block. We can replace it with immutable map to avoid Hashtable `synchronized` overhead. - Commit messages: - [PATCH] Unnecessary Hashtable usage in javax.swing.text.html.parser.Element C

Integrated: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor

2024-12-05 Thread Andrey Turbanov
On Fri, 1 Nov 2024 13:08:54 GMT, Andrey Turbanov wrote: > `Properties` doesn't allow `null` values. > We can replace containsKey+getProperty with getProperty+null check. > It's clearer and a bit faster. This pull request has now been integrated. Changeset: 3b7571d3 Author:

Re: RFR: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor [v2]

2024-12-05 Thread Andrey Turbanov
On Wed, 4 Dec 2024 14:51:14 GMT, Andrey Turbanov wrote: >> `Properties` doesn't allow `null` values. >> We can replace containsKey+getProperty with getProperty+null check. >> It's clearer and a bit faster. > > Andrey Turbanov has updated the pull request in

Re: RFR: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor [v2]

2024-12-04 Thread Andrey Turbanov
On Wed, 4 Dec 2024 13:42:09 GMT, Alexey Ivanov wrote: >> I really like how this line now fits in 80 characters limit. But if you >> insist - I will return it. > > That's what I thought. At the same time, it's only two columns longer than 80 > chars a line. > > The usage of `final` modifiers se

Re: RFR: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor [v2]

2024-12-04 Thread Andrey Turbanov
> `Properties` doesn't allow `null` values. > We can replace containsKey+getProperty with getProperty+null check. > It's clearer and a bit faster. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: inline 'ke

Re: RFR: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor

2024-12-03 Thread Andrey Turbanov
On Tue, 3 Dec 2024 15:52:30 GMT, Alexey Ivanov wrote: >> `Properties` doesn't allow `null` values. >> We can replace containsKey+getProperty with getProperty+null check. >> It's clearer and a bit faster. > > src/java.desktop/share/classes/java/awt/Cursor.java line 303: > >> 301: Stri

RFR: 8345398: Avoid redundant Properties.containsKey call in Cursor.getSystemCustomCursor

2024-12-03 Thread Andrey Turbanov
`Properties` doesn't allow `null` values. We can replace containsKey+getProperty with getProperty+null check. It's clearer and a bit faster. - Commit messages: - [PATCH] Avoid redundant Properties.containsKey calls in Cursor.getSystemCustomCursor Changes: https://git.openjdk.org/jd

Re: RFR: 8343418: Unnecessary Hashtable usage in CSS.htmlAttrToCssAttrMap [v4]

2024-12-02 Thread Andrey Turbanov
On Tue, 12 Nov 2024 20:28:55 GMT, Andrey Turbanov wrote: >> If a thread-safe implementation is not needed, it is recommended to use >> HashMap instead of legacy synchronized Hashtable. >> Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization >>

Integrated: 8343418: Unnecessary Hashtable usage in CSS.htmlAttrToCssAttrMap

2024-12-02 Thread Andrey Turbanov
On Wed, 30 Oct 2024 12:02:14 GMT, Andrey Turbanov wrote: > If a thread-safe implementation is not needed, it is recommended to use > HashMap instead of legacy synchronized Hashtable. > Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization > block and th

Re: RFR: JDK-8344057 : Remove doPrivileged calls from unix platform sources in the java.desktop module [v2]

2024-11-20 Thread Andrey Turbanov
On Tue, 19 Nov 2024 19:36:15 GMT, Harshitha Onkar wrote: >> Post JEP-486 (Permanently Disable the Security Manager) cleanup. >> Calls to java.security.AccessController.doPrivileged are obsolete thus >> removed in this PR. >> >> This PR addresses removal of AccessController.doPrivileged() calls

Re: RFR: 8344064: Remove doPrivileged calls from print/imageio/media classes in the java.desktop module [v2]

2024-11-20 Thread Andrey Turbanov
On Tue, 19 Nov 2024 17:37:16 GMT, Phil Race wrote: >> Remove doPrivileged calls from javax.imageio, javax.print and some sound >> impl classes > > Phil Race has updated the pull request incrementally with one additional > commit since the last revision: > > 8344064 src/java.desktop/share/cl

Re: RFR: 8344064: Remove doPrivileged calls from print/imageio/media classes in the java.desktop module [v2]

2024-11-19 Thread Andrey Turbanov
On Tue, 19 Nov 2024 18:26:10 GMT, Phil Race wrote: >> src/java.desktop/share/classes/com/sun/media/sound/SoftSynthesizer.java line >> 801: >> >>> 799: } >>> 800: return null; >>> 801: }).run(); >> >> Let's unwrap t

Re: RFR: 8344064: Remove doPrivileged calls from print/imageio/media classes in the java.desktop module [v2]

2024-11-19 Thread Andrey Turbanov
On Tue, 19 Nov 2024 17:37:16 GMT, Phil Race wrote: >> Remove doPrivileged calls from javax.imageio, javax.print and some sound >> impl classes > > Phil Race has updated the pull request incrementally with one additional > commit since the last revision: > > 8344064 src/java.desktop/share/cl

Re: RFR: 8344064: Remove doPrivileged calls from print/imageio/media classes in the java.desktop module

2024-11-19 Thread Andrey Turbanov
On Sun, 17 Nov 2024 20:51:26 GMT, Phil Race wrote: > Remove doPrivileged calls from javax.imageio, javax.print and some sound impl > classes src/java.desktop/share/classes/javax/imageio/metadata/IIOMetadata.java line 401: > 399: // Try to load from the module of the IIOMetadata >

Re: RFR: JDK-8344057 : Remove doPrivileged calls from unix platform sources in the java.desktop module

2024-11-19 Thread Andrey Turbanov
On Mon, 18 Nov 2024 20:18:39 GMT, Harshitha Onkar wrote: > Post JEP-486 (Permanently Disable the Security Manager) cleanup. > Calls to java.security.AccessController.doPrivileged are obsolete thus > removed in this PR. > > This PR addresses removal of AccessController.doPrivileged() calls from

Re: RFR: 8315113: Print request Chromaticity.MONOCHROME attribute does not work on macOS

2024-11-13 Thread Andrey Turbanov
On Wed, 6 Nov 2024 14:15:44 GMT, GennadiyKrivoshein wrote: > This update allows users to print with grayscale using color printers. > Actually, it is not possible to use the "Monochrome" option from the "Color > Appearance" panel. Also Chromaticity.MONOCHROME can't be used to print > grayscale

Re: RFR: 8343418: Unnecessary Hashtable usage in CSS.htmlAttrToCssAttrMap [v4]

2024-11-12 Thread Andrey Turbanov
trList = getCssAttribute(key); > > > ![idea_analyze_dataflow_to_here](https://github.com/user-attachments/assets/48ace4de-6d0a-468e-bb14-b579a193254b) > > > I've used HashMap.newHashMap method instead of constructor to avoid resizing > of internal HashMap array. And

Re: RFR: 8283664: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintTextTest.java [v6]

2024-11-07 Thread Andrey Turbanov
On Thu, 7 Nov 2024 00:22:05 GMT, Daniel Gredler wrote: >> There are multiple issue with this test case >> 1) Parser error due to yesno in @run main/manual=yesno >> 2) User can only compare the UI rendering and compare with the print out. >> User can't mark the test as pass or fail due to pass or

Re: RFR: 8343418: Unnecessary Hashtable usage in CSS.htmlAttrToCssAttrMap [v3]

2024-11-06 Thread Andrey Turbanov
On Wed, 6 Nov 2024 06:40:52 GMT, Andrey Turbanov wrote: >> If a thread-safe implementation is not needed, it is recommended to use >> HashMap instead of legacy synchronized Hashtable. >> Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization >>

Re: RFR: 8283664: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintTextTest.java [v5]

2024-11-06 Thread Andrey Turbanov
On Tue, 5 Nov 2024 23:16:01 GMT, Daniel Gredler wrote: >> There are multiple issue with this test case >> 1) Parser error due to yesno in @run main/manual=yesno >> 2) User can only compare the UI rendering and compare with the print out. >> User can't mark the test as pass or fail due to pass or

Re: RFR: 8343418: Unnecessary Hashtable usage in CSS.htmlAttrToCssAttrMap [v3]

2024-11-05 Thread Andrey Turbanov
trList = getCssAttribute(key); > > > ![idea_analyze_dataflow_to_here](https://github.com/user-attachments/assets/48ace4de-6d0a-468e-bb14-b579a193254b) > > > I've used HashMap.newHashMap method instead of constructor to avoid resizing > of internal HashMap array. And

Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap

2024-11-02 Thread Andrey Turbanov
On Fri, 1 Nov 2024 22:21:31 GMT, Phil Race wrote: >I am not seeing a lot of value in this churn in completely OK code. Can't say I see that code as "OK". Hashtable usage in 2024 brings eye bleeding for most of developers. Specifying incorrect initial size adds even more _fun_. >Instead please f

Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap [v2]

2024-11-02 Thread Andrey Turbanov
trList = getCssAttribute(key); > > > ![idea_analyze_dataflow_to_here](https://github.com/user-attachments/assets/48ace4de-6d0a-468e-bb14-b579a193254b) > > > I've used HashMap.newHashMap method instead of constructor to avoid resizing > of internal HashMap array.

Re: RFR: 8342082: Remove unused BasicProgressBarUI.Animator.interval [v3]

2024-11-02 Thread Andrey Turbanov
On Fri, 1 Nov 2024 11:45:04 GMT, Andrey Turbanov wrote: >> The field `javax.swing.plaf.basic.BasicProgressBarUI.Animator.interval` is >> unused and can be removed. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit si

Integrated: 8342082: Remove unused BasicProgressBarUI.Animator.interval

2024-11-02 Thread Andrey Turbanov
On Mon, 23 Sep 2024 09:44:21 GMT, Andrey Turbanov wrote: > The field `javax.swing.plaf.basic.BasicProgressBarUI.Animator.interval` is > unused and can be removed. This pull request has now been integrated. Changeset: 069bb791 Author:Andrey Turbanov URL: https://git.openjdk.o

Re: RFR: 8342082: Remove unused BasicProgressBarUI.Animator.interval [v3]

2024-11-01 Thread Andrey Turbanov
> The field `javax.swing.plaf.basic.BasicProgressBarUI.Animator.interval` is > unused and can be removed. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8342082: Remove unused BasicProgressBarUI.Animator.interval op

Re: RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap

2024-11-01 Thread Andrey Turbanov
On Thu, 31 Oct 2024 20:36:28 GMT, Harshitha Onkar wrote: >> If a thread-safe implementation is not needed, it is recommended to use >> HashMap instead of legacy synchronized Hashtable. >> Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization >> block and then only `get`

RFR: 8343418: Use HashMap instead of Hashtable for CSS.htmlAttrToCssAttrMap

2024-11-01 Thread Andrey Turbanov
If a thread-safe implementation is not needed, it is recommended to use HashMap instead of legacy synchronized Hashtable. Map `CSS.htmlAttrToCssAttrMap` is modified only within static initialization block and then only `get` method is called. The only subtle difference is that Hashtable doesn't

Re: RFR: 8342082: Remove unused BasicProgressBarUI.Animator.interval [v2]

2024-10-28 Thread Andrey Turbanov
> The field `javax.swing.plaf.basic.BasicProgressBarUI.Animator.interval` is > unused and can be removed. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8342082: Remove unused BasicProgressBarUI.Animator.interval

RFR: 8296535: Unnecessary Vector usage in AquaFileSystemModel.FilesLoader

2024-10-28 Thread Andrey Turbanov
`acceptsList` is created, filled and used only _locally_ in the method `com.apple.laf.AquaFileSystemModel.FilesLoader#run`. So we can avoid usage of legacy synchronized `Vector` here and use `ArrayList` instead. - Commit messages: - [PATCH] Unnecessary Vector usage in AquaFileSyste

Re: RFR: 8296535: Unnecessary Vector usage in AquaFileSystemModel.FilesLoader

2024-10-28 Thread Andrey Turbanov
On Thu, 12 Sep 2024 07:09:36 GMT, Andrey Turbanov wrote: > `acceptsList` is created, filled and used only _locally_ in the method > `com.apple.laf.AquaFileSystemModel.FilesLoader#run`. > So we can avoid usage of legacy synchronized `Vector` here and use > `ArrayList` instead. src/

ImageCache. LinkedHashMap(accessOrder=true) shouldn't be guarded by ReadWriteLock

2024-10-16 Thread Andrey Turbanov
e/java/util/LinkedHashMap.html > In access-ordered linked hash maps, merely querying the map with get is a > structural modification. It means there is a possible data race. Andrey Turbanov

Re: RFR: 8341055: Open some TextArea awt tests 2

2024-10-15 Thread Andrey Turbanov
On Thu, 10 Oct 2024 01:06:24 GMT, Alisen Chung wrote: > Second set of textarea awt tests to open during fall 2024 test sprint test/jdk/java/awt/TextArea/TextAreaScrollbarTest.java line 113: > 111: add(t10); > 112: > 113: setSize(600,600); Suggestion: setSize(600, 600)

RFR: 8342082: Remove unused BasicProgressBarUI.Animator.interval

2024-10-14 Thread Andrey Turbanov
The field `javax.swing.plaf.basic.BasicProgressBarUI.Animator.interval` is unused and can be removed. - Commit messages: - [PATCH] Remove unused javax.swing.plaf.basic.BasicProgressBarUI.Animator.interval Changes: https://git.openjdk.org/jdk/pull/21132/files Webrev: https://webr

Re: RFR: JDK-8340555 : Open source DnD tests - Set4 [v8]

2024-10-02 Thread Andrey Turbanov
On Wed, 2 Oct 2024 17:49:41 GMT, Harshitha Onkar wrote: >> Following tests are added as part of this PR: >> >> 1. /java/awt/dnd/DnDHTMLToOutlookTest/DnDHTMLToOutlookTest.java - **Manual >> PassFailJFrame (PFJ) test**, problemlisted on all platforms. >> >> 2. java/awt/dnd/DragSourceMotionListen

Re: RFR: 8340458: Open source additional Component tests (part 2) [v2]

2024-10-01 Thread Andrey Turbanov
On Mon, 30 Sep 2024 22:32:19 GMT, Alexander Zuev wrote: >> Clean up and open source four more tests. > > Alexander Zuev has updated the pull request incrementally with one additional > commit since the last revision: > > Moved variables initialization into the method that is called on EDT; >

Re: RFR: 8341000: Open source some of the AWT Window tests

2024-10-01 Thread Andrey Turbanov
On Tue, 1 Oct 2024 09:12:15 GMT, Jayathirth D V wrote: > Clean up and open source some of the AWT window tests. > Automated test `InvalidFocusLostEventTest.java` is verified in our CI also > and it passes on all platforms. test/jdk/java/awt/Window/InvalidFocusLostEventTest/InvalidFocusLostEvent

Re: RFR: 8341191: Open source few more AWT FileDialog tests

2024-10-01 Thread Andrey Turbanov
On Tue, 1 Oct 2024 05:06:10 GMT, Abhishek Kumar wrote: > AWT File Dialog related tests are converted from applet to manual and moved > to open. test/jdk/java/awt/FileDialog/PathChoiceDisposeTest.java line 43: > 41: public class PathChoiceDisposeTest { > 42: public static void main(String[]

Re: RFR: 8340560: Open Source several AWT/2D font and rendering tests

2024-09-26 Thread Andrey Turbanov
On Wed, 25 Sep 2024 20:29:40 GMT, Phil Race wrote: > Open sourcing some rendering tests. test/jdk/sun/awt/font/TestArabicHebrew.java line 75: > 73: int index = font.canDisplayUpTo(str); > 74: if (index != -1) { > 75: throw new RuntimeException("Cannot display char "

Re: RFR: 8340354: Open source AWT desktop properties and print related tests

2024-09-26 Thread Andrey Turbanov
On Thu, 26 Sep 2024 05:47:33 GMT, Abhishek Kumar wrote: > AWT Desktop properties and printer related tests are converted from applet to > manual and moved to open. test/jdk/java/awt/PrintJob/PrintCompatibilityTest.java line 195: > 193: menu3.setEnabled(false); > 194: menu4.setE

Re: RFR: 8340621: Open source several AWT List tests

2024-09-26 Thread Andrey Turbanov
On Thu, 26 Sep 2024 09:43:25 GMT, Prasanta Sadhukhan wrote: > Opensource few AWT List tests test/jdk/java/awt/List/DisabledListIsGreyTest.java line 63: > 61: List list1 = new List(3); > 62: List list2 = new List(3); > 63: for(int i = 0; i < 5; i++) { Suggestion:

Re: RFR: 8340084: Open source AWT Frame related tests [v3]

2024-09-20 Thread Andrey Turbanov
On Fri, 20 Sep 2024 08:04:30 GMT, Abhishek Kumar wrote: >> Few AWT Frame related tests are converted from applet to manual and moved to >> open. > > Abhishek Kumar has updated the pull request incrementally with one additional > commit since the last revision: > > Review comment update test

Integrated: 8339972: Make a few fields in SortingFocusTraversalPolicy static

2024-09-20 Thread Andrey Turbanov
On Thu, 25 Jul 2024 11:17:23 GMT, Andrey Turbanov wrote: > 2 fields in javax.swing.SortingFocusTraversalPolicy could be made 'static': > 1. FORWARD_TRAVERSAL = 0 > 2. BACKWARD_TRAVERSAL = 1 This pull request has now been integrated. Changeset: fe80618b Author:A

Re: RFR: 8339972: Make a few fields in SortingFocusTraversalPolicy static

2024-09-19 Thread Andrey Turbanov
On Thu, 25 Jul 2024 11:17:23 GMT, Andrey Turbanov wrote: > 2 fields in javax.swing.SortingFocusTraversalPolicy could be made 'static': > 1. FORWARD_TRAVERSAL = 0 > 2. BACKWARD_TRAVERSAL = 1 Any more reviewers? I will integrate tomorrow. - PR Comment: https://

RFR: 8339972: Make a few fields in SortingFocusTraversalPolicy static

2024-09-11 Thread Andrey Turbanov
2 fields in javax.swing.SortingFocusTraversalPolicy could be made 'static': 1. FORWARD_TRAVERSAL = 0 2. BACKWARD_TRAVERSAL = 1 - Commit messages: - [PATCH] Make a few fields in SortingFocusTraversalPolicy static Changes: https://git.openjdk.org/jdk/pull/20327/files Webrev: https:/

Re: RFR: 8308588: Unnecessary synchronized on GTKStyle#ICONS_MAP can be removed [v2]

2024-09-02 Thread Andrey Turbanov
On Fri, 30 Aug 2024 04:57:56 GMT, Abhishek Kumar wrote: >> `static final Map ICONS_MAP` is modified only in >> `static` block. Then >> [com.sun.java.swing.plaf.gtk.GTKStyle#get](https://github.com/kumarabhi006/jdk/blob/73f7a5f15dbba54a98f3916ff1190520ac07874d/src/java.desktop/share/classes/com/

Re: RFR: 8235404: [macos] JOptionPane blocks drawing string on another component [v3]

2024-08-06 Thread Andrey Turbanov
On Tue, 6 Aug 2024 00:41:53 GMT, Alisen Chung wrote: >> Currently if you try to use graphics to draw a string on a frame using >> JOptionPane + JTextField with a listener as a prompt, the string will not >> draw. Adding a repaint after dialog.dispose in JOptionPane will cause the >> text to sh

Re: RFR: 8155030: The Menu Mnemonics are always displayed for GTK LAF [v18]

2024-07-11 Thread Andrey Turbanov
On Mon, 8 Jul 2024 15:40:25 GMT, Abhishek Kumar wrote: >> In GTK LAF, the menu mnemonics are always displayed which is different from >> the native behavior. In native application **(tested with gedit for normal >> buttons and tested with libreoffice for menu**), the menu mnemonics toggle >> o

Re: RFR: 8334495: Use FFM instead of jdk.internal.misc.Unsafe in java.desktop font implementation [v3]

2024-07-09 Thread Andrey Turbanov
On Thu, 27 Jun 2024 18:29:55 GMT, Phil Race wrote: >> Migrate font code from jdk.internal.misc.Unsafe to using FFM. >> This reduces the coupling between the java.desktop module and the internals >> of the java.base module. >> >> The code being changed here is not particularly performance sensit

Re: RFR: 8327401: Some jtreg tests fail on Wayland without any tracking bug [v2]

2024-05-29 Thread Andrey Turbanov
On Wed, 22 May 2024 21:52:14 GMT, Alexander Zvegintsev wrote: >> These changes are intended to stabilize testing on Wayland in X11 >> compatibility mode. >> >> >> >> Many tests may fail if there is no `robot.delay()` call after >> `robot.waitForIdle()` (right after displaying a window). >>

Re: RFR: 8332416: Add more font selection options to Font2DTest [v2]

2024-05-21 Thread Andrey Turbanov
On Thu, 16 May 2024 19:16:26 GMT, Phil Race wrote: >> Enhance Font2DTest as follows >> >> - Add main menu Radio Button options so that you select the font to use as >> either >> - (1) Font Family + Style (as now) >> - (2) Font Family + Menu of all members of the Family, replacing the Style >>

Re: RFR: 8328896: Fontmetrics for large Fonts has zero width

2024-04-09 Thread Andrey Turbanov
On Tue, 9 Apr 2024 18:50:17 GMT, Phil Race wrote: > The main problem here is that we do not curate what font point size we passed > to freetype, > and would pass in one larger than freetype's maximum of FT_USHORT_MAX which > is USHRT_MAX. > This isn't documented, SFAICS, and is checked a couple

Re: RFR: 8328642: Convert applet test MouseDraggedOutCauseScrollingTest.html to main

2024-03-21 Thread Andrey Turbanov
On Wed, 20 Mar 2024 21:33:04 GMT, Phil Race wrote: > Converts > java/awt/List/MouseDraggedOutCauseScrollingTest/MouseDraggedOutCauseScrollingTest.html > to a main program. test/jdk/java/awt/List/MouseDraggedOutCauseScrollingTest/MouseDraggedOutCauseScrollingTest.java line 65: > 63: fr

Re: RFR: 8328384: Convert java/awt/FileDialog/FileDialogOpenDirTest test to main

2024-03-19 Thread Andrey Turbanov
On Mon, 18 Mar 2024 20:45:03 GMT, Alexander Zuev wrote: > Convert test to main manual; > Move test to appropriate folder; > Delete old files; test/jdk/java/awt/FileDialog/FileDialogOpenDirTest.java line 41: > 39: public class FileDialogOpenDirTest { > 40: private static JFrame initialize()

Re: RFR: 8322140: javax/swing/JTable/JTableScrollPrintTest.java does not print the rows and columns of the table in NimbusLookAndFeel

2024-03-18 Thread Andrey Turbanov
On Mon, 11 Mar 2024 10:05:41 GMT, Tejesh R wrote: > Fix suggested in bug > [8210807](https://github.com/openjdk/jdk/commit/38bbbe7588c94d3a0edd1c120ba49cbd0851a720) > had a regression in Nimbus L&F yet it resolved the issue in other L&F. The > better approach would be to handle `MultiResolutio

Re: RFR: JDK-8328190 : Convert AWTPanelSmoothWheel.html applet test to main [v3]

2024-03-16 Thread Andrey Turbanov
On Sat, 16 Mar 2024 09:36:57 GMT, Harshitha Onkar wrote: >> This test is converted to main using PassFailJFrame. It verifies wheel >> rotation value for high-res mouse on windows. >> >> The test requires the updated PassFailJFrame's logArea() feature added in >> this PR https://github.com/open

Re: RFR: 8328301: Convert Applet test ManualHTMLDataFlavorTest.java to main program

2024-03-16 Thread Andrey Turbanov
On Fri, 15 Mar 2024 22:32:12 GMT, Phil Race wrote: > Convert this applet based test to a main program test/jdk/java/awt/datatransfer/HTMLDataFlavors/ManualHTMLDataFlavorTest.java line 60: > 58: @Override > 59: public Dimension getPreferredSize() { > 60: return new D

Re: RFR: JDK-8328299 : Convert DnDFileGroupDescriptor.html applet test to main

2024-03-16 Thread Andrey Turbanov
On Fri, 15 Mar 2024 22:54:23 GMT, Harshitha Onkar wrote: > Following test > java/awt/dnd/DnDFileGroupDescriptor/DnDFileGroupDescriptor.html is converted > to main using PassFailJFrame. > > This test is currently problem-listed on macOS and linux, but as per the > previous JBS bugs > [[JDK-62

Re: RFR: 8325179: Race in BasicDirectoryModel.validateFileCache [v3]

2024-03-13 Thread Andrey Turbanov
On Wed, 6 Mar 2024 11:27:08 GMT, Alexey Ivanov wrote: >> Ensure access to the `filesLoader` field of `BasicDirectoryModel` is >> synchronized. >> >> Without synchronization, a thread checks if `filesLoader` is not null and >> creates a new `FilesLoader` thread. If the thread is pre-empted betw

Re: RFR: 8316388: Opensource five Swing component related regression tests

2024-03-11 Thread Andrey Turbanov
On Mon, 11 Mar 2024 09:41:47 GMT, Alexander Zuev wrote: > Clean up five more tests. > > test/jdk/javax/swing/JDesktopPane/4132993/bug4132993.java > test/jdk/javax/swing/JDesktopPane/4773378/bug4773378.java > test/jdk/javax/swing/JEditorPane/4325606/bug4325606.java > test/jdk/javax/swing/JEditorP

Re: RFR: 8325179: Race in BasicDirectoryModel.validateFileCache

2024-03-05 Thread Andrey Turbanov
On Mon, 4 Mar 2024 20:21:30 GMT, Alexey Ivanov wrote: > Ensure access to the `filesLoader` field of `BasicDirectoryModel` is > synchronized. > > Without synchronization, a thread checks if `filesLoader` is not null and > creates a new `FilesLoader` thread. If the thread is pre-empted between t

Re: RFR: 8325179: Race in BasicDirectoryModel.validateFileCache

2024-03-05 Thread Andrey Turbanov
On Mon, 4 Mar 2024 20:21:30 GMT, Alexey Ivanov wrote: > Ensure access to the `filesLoader` field of `BasicDirectoryModel` is > synchronized. > > Without synchronization, a thread checks if `filesLoader` is not null and > creates a new `FilesLoader` thread. If the thread is pre-empted between t

Re: RFR: 8320676 : Manual printer tests have no Pass/Fail buttons, instructions close set 1 [v8]

2024-02-14 Thread Andrey Turbanov
On Wed, 14 Feb 2024 09:06:19 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> >> Updated manual printer test cases with 'PassFailJFrame', also removed unused >> variables. Added 'SkippedException' in case of printer missing or not >> configured. >> >> Please review and let me know

Re: RFR: 8226990: GTK & Nimbus LAF: Tabbed pane's background color is not expected one when change the opaque checkbox.

2024-02-09 Thread Andrey Turbanov
On Tue, 6 Feb 2024 05:43:26 GMT, Abhishek Kumar wrote: > JTabbedPane's content area, tab area and tab background color are not as > expected when opaque is set to true or false. > The proposed fix is to handle the TabbedPane's background color in installed > LAFs. Manual test is added to suppo

Re: RFR: 8323670: A few client tests intermittently throw ConcurrentModificationException

2024-01-23 Thread Andrey Turbanov
On Mon, 22 Jan 2024 09:34:48 GMT, Tejesh R wrote: >> `synchronized` _works_ only if synchronized object is the same in all >> places. In the new method "synchronized object" - is an instance of >> `FilesLoader`, while in other places `fileCache` is accessed under >> `synchronized(fileCache)`.

Re: RFR: 8323670: A few client tests intermittently throw ConcurrentModificationException

2024-01-22 Thread Andrey Turbanov
On Mon, 22 Jan 2024 08:37:24 GMT, Tejesh R wrote: >> _all reads or writes to that object's variables are done through >> synchronized methods_ >> >> This is a key requirement. In your case you have added `synchronized` only >> to a method, which reads that object. But a writer is not `synchron

Re: RFR: 8323670: A few client tests intermittently throw ConcurrentModificationException

2024-01-22 Thread Andrey Turbanov
On Mon, 22 Jan 2024 08:30:05 GMT, Tejesh R wrote: >> It doesn't work like this. Modification happen in another thread in another >> method. This `synchronized` doesn't affect another method. > > "_Synchronized methods enable a simple strategy for preventing thread > interference and memory cons

Re: RFR: 8323670: A few client tests intermittently throw ConcurrentModificationException

2024-01-21 Thread Andrey Turbanov
On Mon, 22 Jan 2024 07:27:50 GMT, Tejesh R wrote: >> Vector.iterator and Vector.subList.iterator are still check for modification >> on iteration (see usages of the method >> `java.util.AbstractList.SubList#checkForComodification`). It means, if >> vector was concurrently modified during itera

Re: RFR: 8323670: A few client tests intermittently throw ConcurrentModificationException

2024-01-21 Thread Andrey Turbanov
On Mon, 22 Jan 2024 06:50:21 GMT, Tejesh R wrote: >> src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java >> line 417: >> >>> 415: } >>> 416: >>> 417: private synchronized boolean compareIterators(Iterator >>> iterator1, Iterator iterator2) { >> >>

Re: RFR: 8323670: A few client tests intermittently throw ConcurrentModificationException

2024-01-20 Thread Andrey Turbanov
On Wed, 17 Jan 2024 12:55:52 GMT, Tejesh R wrote: > Suggested fix [JDK-8307091](https://bugs.openjdk.org/browse/JDK-8307091) also > created concurrent exception intermittently (monthly once/quarterly once) on > CI system. The issue was not able to be reproduced yet, hence proposing an > altern

Re: RFR: JDK-8320113: [macos14] : ShapeNotSetSometimes.java fails intermittently on macOS 14 [v2]

2024-01-15 Thread Andrey Turbanov
On Fri, 12 Jan 2024 20:21:52 GMT, Harshitha Onkar wrote: >> ShapeNotSetSometimes.java fails intermittently on macOS 14. Following is a >> test stabilization fix for macOS 14. With the added delays >> ShapeNotSetSometimes.java passes on older versions of macOS as well as on >> macOS 14.1, 14.2.

Re: RFR: 8316931: [macos14] Test "java/awt/TrayIcon/ShowAfterDisposeTest/ShowAfterDisposeTest.html" throws and exception on Mac OS 14(x64, aarch64) [v4]

2024-01-14 Thread Andrey Turbanov
On Fri, 12 Jan 2024 22:18:04 GMT, Alisen Chung wrote: >> SunToolkit.java is trying to post an event on the TrayIcon appContext, but >> the TrayIcon was already removed by the test, causing an error. The fix is >> to make SunToolkit skip posting the event if appContext is null. The test is >> a

Re: RFR: 8316497 : ColorConvertOp - typo for non-ICC conversions needs one-line fix [v2]

2023-12-21 Thread Andrey Turbanov
On Thu, 7 Dec 2023 09:17:05 GMT, Renjith Kannath Pariyangad wrote: >> Hi Reviewers, >> There was a typo for color conversion instead of dstColorSpace function >> srcColorSpace was used. Please review and let me know your suggestions if >> any. >> >> Renjith. > > Renjith Kannath Pariyangad h

Re: RFR: 5108458: JTable does not properly layout its content [v13]

2023-12-02 Thread Andrey Turbanov
On Fri, 1 Dec 2023 09:26:41 GMT, Tejesh R wrote: >> Table contents does not follow right-left Orientation when Max width of >> columns are set. This is due to not considering the offset in `x position` >> while painting table grid and table cell. The fix handles the offset and >> adjust the x

Re: RFR: 8320443: [macos] Test java/awt/print/PrinterJob/PrinterDevice.java fails on macOS

2023-11-21 Thread Andrey Turbanov
On Tue, 21 Nov 2023 21:23:12 GMT, Phil Race wrote: > For as long as we've had the macOS port, it seems that queries on the > GraphicsConfiguration associated with > a printer would give you null for the defaultTransform. > Clearly this API isn't a popular one to call in such a context else we'd

Re: RFR: 8318113: CSS.BackgroundImage doesn't implement equals [v3]

2023-11-16 Thread Andrey Turbanov
On Thu, 16 Nov 2023 07:04:43 GMT, Prasanta Sadhukhan wrote: >> CSSBackgroundImage.equals() is implemented > > Prasanta Sadhukhan has updated the pull request incrementally with one > additional commit since the last revision: > > Use Objects.hashCode and add bugid Use Objects.hashCode witho

Re: RFR: 8318113: CSS.BackgroundImage doesn't implement equals [v3]

2023-11-16 Thread Andrey Turbanov
On Fri, 10 Nov 2023 21:12:16 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Use Objects.hashCode and add bugid > > src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 2971

Re: RFR: 8224261: JProgressBar always with border painted around it

2023-11-13 Thread Andrey Turbanov
On Thu, 2 Nov 2023 04:13:17 GMT, Abhishek Kumar wrote: > JProgressBar is always painted with border irrespective of the value set via > the API `setBorderPainted(boolean value)` in Synth (Nimbus and GTK) LAF. > Proposed fix is to add a check before painting the component. > > CI jobs are green

Re: RFR: 8210807: Printing a JTable with a JScrollPane prints table without rows populated [v10]

2023-11-13 Thread Andrey Turbanov
On Fri, 10 Nov 2023 11:36:32 GMT, Tejesh R wrote: >> `BackingStore` uses its own Graphics to Paint the Image. This is fine when >> we want to paint it on a Window/Frame, but fails to print. Since >> `WPathGraphics` is used for Printing, backing store fails to print it and >> backing store uses

Re: RFR: JDK-6690019: JOptionPane obscured behind an always on top JFrame hangs UI [v3]

2023-10-11 Thread Andrey Turbanov
On Tue, 10 Oct 2023 03:50:11 GMT, Prasanta Sadhukhan wrote: >> A JOptionPane message dialog owned by a JFrame which is not always on top >> can be obscured behind an `"always on top" JFrame`. Since the option pane is >> modal, one can't move the "always on top frame" to reveal it, so the >> a

Integrated: 8316556: Fix typos in java.desktop

2023-09-24 Thread Andrey Turbanov
On Sat, 16 Sep 2023 16:22:40 GMT, Andrey Turbanov wrote: > PR with non-swing changes extracted from initial #14847 This pull request has now been integrated. Changeset: 89e068bc Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/commit/89e068bc19b12bb8f4a175fdf979cbe795ac3

Re: RFR: 8316556: Fix typos in java.desktop [v2]

2023-09-24 Thread Andrey Turbanov
> PR with non-swing changes extracted from initial #14847 Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8316556: Fix typos in java.desktop - Changes: - all: https://git.openjdk.org/jdk/pull/15773/files -

Re: RFR: 8316389: Open source few AWT applet tests [v4]

2023-09-23 Thread Andrey Turbanov
On Wed, 20 Sep 2023 16:55:30 GMT, Alexander Zvegintsev wrote: >> Open sourcing few tests: >> >> java/awt/Frame/FrameRepackTest.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_1.java >> java/awt/Frame/FrameResizeTest/FrameResizeTest_2.java >> java/awt/Frame/WindowMoveTest.java > > Alexand

Re: RFR: 8316211: Open source several manual applet tests [v2]

2023-09-22 Thread Andrey Turbanov
On Wed, 20 Sep 2023 01:46:35 GMT, Alexander Zvegintsev wrote: >> Open sourcing several manual applet tests >> >> >> test/jdk/java/awt/Frame/DefaultSizeTest.java >> test/jdk/java/awt/LightweightComponent/LightweightCliprect.java >> test/jdk/java/awt/event/KeyEvent/FunctionKeyTest.java >> test/j

RFR: 8316556: Fix typos in java.desktop

2023-09-19 Thread Andrey Turbanov
PR with non-swing changes extracted from initial #14847 - Commit messages: - [PATCH] Fix typos in java.desktop - [PATCH] Fix typos in java.desktop Changes: https://git.openjdk.org/jdk/pull/15773/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15773&range=00 Issue: https:/

Re: RFR: JDK-8315876 Open source several Swing CSS related tests

2023-09-18 Thread Andrey Turbanov
On Fri, 15 Sep 2023 19:35:15 GMT, Harshitha Onkar wrote: > Following tests are open sourced as part of this PR. > > 1. test/jdk/javax/swing/text/html/CSS/bug4174871.java > 2. test/jdk/javax/swing/text/html/CSS/bug4174874.java > 3. test/jdk/javax/swing/text/html/CSS/bug4284162.java > 4. test/jdk/

Integrated: 8312165: Fix typos in java.desktop Swing

2023-09-15 Thread Andrey Turbanov
On Wed, 12 Jul 2023 08:33:30 GMT, Andrey Turbanov wrote: > Found many typos in java.desktop by IDEA's inspection `Proofreading | Typo` This pull request has now been integrated. Changeset: 89cb290b Author: Andrey Turbanov URL: https://git.openjdk.org/jd

  1   2   3   >