Re: RFR: 8055461: getNextID in ImageIcon class can lead to overflow [v2]

2025-06-12 Thread Prasanta Sadhukhan
On Wed, 11 Jun 2025 15:04:21 GMT, Prasanta Sadhukhan wrote: >> ImageIcon.getNextID uses `mediaTrackerID ` which do not detect overflow. >> >> Theoretically there is a possibility that there can be overflow in the long >> time run or for large number of created "imageIcon" >> >> Made sure ther

Re: RFR: 8055461: getNextID in ImageIcon class can lead to overflow [v2]

2025-06-12 Thread Alexey Ivanov
On Wed, 11 Jun 2025 15:04:21 GMT, Prasanta Sadhukhan wrote: >> ImageIcon.getNextID uses `mediaTrackerID ` which do not detect overflow. >> >> Theoretically there is a possibility that there can be overflow in the long >> time run or for large number of created "imageIcon" >> >> Made sure ther

Re: RFR: 8159055: ImageIcon.setImage can't handle null parameter [v2]

2025-06-12 Thread Prasanta Sadhukhan
On Thu, 12 Jun 2025 17:56:50 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> javadoc > > src/java.desktop/share/classes/javax/swing/ImageIcon.java line 374: > >> 372: */ >> 373:

Re: RFR: 8159055: ImageIcon.setImage can't handle null parameter [v2]

2025-06-12 Thread Prasanta Sadhukhan
On Thu, 12 Jun 2025 06:34:09 GMT, Prasanta Sadhukhan wrote: >> When trying to call 'icon.setImage(null);' where 'icon' is an instance of >> ImageIcon, a null pointer exception is thrown at runtime. >> The code tried to get the `id` for that image and instantiates >> `MediaTracker` to associate

Re: RFR: 8359061: Update and ProblemList manual test java/awt/Cursor/CursorDragTest/ListDragCursor.java [v4]

2025-06-12 Thread Harshitha Onkar
On Thu, 12 Jun 2025 23:33:46 GMT, Damon Nguyen wrote: >> This change is to restore the original intent of the test by updating the >> instructions to check that the type of Cursor is preserved when clicked and >> dragged. Now the test correctly has instructions to check that an I-beam >> curso

Re: RFR: 8150564: Migrate useful ExtendedRobot methods into awt.Robot [v20]

2025-06-12 Thread Alisen Chung
> Some useful methods in ExtendedRobot should be migrated into Robot itself so > that ExtendedRobot can be removed in the future. The tests using > ExtendedRobot for these migrated methods are changed to use only Robot > (removing unnecessary building of ExtendedRobot). Alisen Chung has updated

Re: RFR: 8359061: Update and ProblemList manual test java/awt/Cursor/CursorDragTest/ListDragCursor.java [v4]

2025-06-12 Thread Harshitha Onkar
On Thu, 12 Jun 2025 23:33:46 GMT, Damon Nguyen wrote: >> This change is to restore the original intent of the test by updating the >> instructions to check that the type of Cursor is preserved when clicked and >> dragged. Now the test correctly has instructions to check that an I-beam >> curso

Re: RFR: 8359061: Update and ProblemList manual test java/awt/Cursor/CursorDragTest/ListDragCursor.java [v3]

2025-06-12 Thread Damon Nguyen
On Thu, 12 Jun 2025 17:53:12 GMT, Damon Nguyen wrote: >> This change is to restore the original intent of the test by updating the >> instructions to check that the type of Cursor is preserved when clicked and >> dragged. Now the test correctly has instructions to check that an I-beam >> curso

Re: RFR: 8359061: Update and ProblemList manual test java/awt/Cursor/CursorDragTest/ListDragCursor.java [v4]

2025-06-12 Thread Damon Nguyen
> This change is to restore the original intent of the test by updating the > instructions to check that the type of Cursor is preserved when clicked and > dragged. Now the test correctly has instructions to check that an I-beam > cursor stays an I-beam until released over a List with its cursor

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v6]

2025-06-12 Thread Sergey Bylokhov
On Thu, 12 Jun 2025 23:06:41 GMT, Sergey Bylokhov wrote: >> I am not sure that's the case. I think it best to leave the comment as it is >> - minus mention of applet. > > After the applet removal, this could be dead code. It might be better not to > mention JInternalFrame unless we have prove t

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v6]

2025-06-12 Thread Sergey Bylokhov
On Thu, 12 Jun 2025 21:54:03 GMT, Phil Race wrote: >> src/java.desktop/share/classes/java/awt/Window.java line 3864: >> >>> 3862: content.setOpaque(isOpaque); >>> 3863: >>> 3864: // Iterate down one level to see whether we have (eg) >>> a JInternalFrame >> >> I

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v8]

2025-06-12 Thread Sergey Bylokhov
On Thu, 12 Jun 2025 22:20:01 GMT, Phil Race wrote: >> This is the implementation of JEP 504 - Remove the Applet API. >> API changes are >> - Remove the entire java.applet package >> - Remove the javax/swing/JApplet class >> - Remove applet related APIs in java.beans >> - Update javadoc referring

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v6]

2025-06-12 Thread Sergey Bylokhov
On Thu, 12 Jun 2025 21:45:50 GMT, Phil Race wrote: >> src/java.desktop/share/classes/javax/imageio/spi/IIORegistry.java line 113: >> >>> 111: * registry functions. >>> 112: * >>> 113: * Each {@code ThreadGroup} will receive its own instance. >> >> Note that this new specificatio

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v8]

2025-06-12 Thread Sergey Bylokhov
On Thu, 12 Jun 2025 22:34:51 GMT, Phil Race wrote: >> test/jdk/javax/sound/sampled/Clip/AudioContentHandlers.java line 51: >> >>> 49: * @run main/othervm -Xmx128m AudioContentHandlers >>> 50: */ >>> 51: public final class AudioContentHandlers { >> >> I see the src/java.desktop/share/classes/s

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v5]

2025-06-12 Thread Phil Race
On Wed, 11 Jun 2025 19:42:38 GMT, Sergey Bylokhov wrote: >> Phil Race has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8359053 > > test/jdk/javax/sound/sampled/Clip/AutoCloseTimeCheck.java line 44: > >> (failed to retrieve contents of fi

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v8]

2025-06-12 Thread Phil Race
On Wed, 11 Jun 2025 19:38:01 GMT, Sergey Bylokhov wrote: >> Phil Race has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8359053 > > test/hotspot/jtreg/vmTestbase/jit/misctests/fpustack/GraphApplet.java line 33: > >> 31: * @library /vmTes

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v8]

2025-06-12 Thread Phil Race
On Mon, 9 Jun 2025 19:39:11 GMT, Alexey Ivanov wrote: >> Phil Race has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8359053 > > src/java.desktop/share/classes/javax/swing/JComponent.java line 4684: > >> 4682: >> 4683: /** >> 4684:

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v6]

2025-06-12 Thread Phil Race
On Wed, 11 Jun 2025 19:22:02 GMT, Sergey Bylokhov wrote: >> Phil Race has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8359053 > > src/java.desktop/share/classes/java/awt/Window.java line 3864: > >> 3862: content.setOpaqu

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v8]

2025-06-12 Thread Phil Race
> This is the implementation of JEP 504 - Remove the Applet API. > API changes are > - Remove the entire java.applet package > - Remove the javax/swing/JApplet class > - Remove applet related APIs in java.beans > - Update javadoc referring to applets, including one gif image - now changed > to an

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v6]

2025-06-12 Thread Phil Race
On Wed, 11 Jun 2025 19:31:39 GMT, Sergey Bylokhov wrote: >> Phil Race has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8359053 > > src/java.desktop/share/classes/javax/swing/SwingUtilities.java line 1656: > >> 1654: * @return the fi

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v7]

2025-06-12 Thread Phil Race
> This is the implementation of JEP 504 - Remove the Applet API. > API changes are > - Remove the entire java.applet package > - Remove the javax/swing/JApplet class > - Remove applet related APIs in java.beans > - Update javadoc referring to applets, including one gif image - now changed > to an

Does anyone still want netbeans project files for building/running client demos ?

2025-06-12 Thread Philip Race
I just submitted https://bugs.openjdk.org/browse/JDK-8359381 - There are netbeans projects for the client demos. % ls src/demo/share/nbproject README.txt jfc project.xml % ls src/demo/share/nbproject/jfc FileChooserDemo Notepad TransparentRuler Font2DTest SampleTree Metalworks TableExample -

Re: RFR: 8358623: Avoid unnecessary data copying in ICC_Profile

2025-06-12 Thread Sergey Bylokhov
On Thu, 12 Jun 2025 05:26:54 GMT, Harshitha Onkar wrote: > [verifyHeader(byte[] > data)](https://github.com/openjdk/jdk/blob/3b32f6a8ec37338764d3e6713247ff96e49bf5b3/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java#L1176C2-L1184C6), > expects header byte array and not the entire p

Re: RFR: 8150564: Migrate useful ExtendedRobot methods into awt.Robot [v19]

2025-06-12 Thread Alisen Chung
On Wed, 11 Jun 2025 18:12:22 GMT, Harshitha Onkar wrote: >> test/jdk/lib/client/ExtendedRobot.java line 237: >> >>> 235: public void glide(Point src, Point dest) { >>> 236: glide(src.x, src.y, dest.x, dest.y, DEFAULT_STEP_LENGTH, >>> DEFAULT_SPEED); >>> 237: } >> >> @alisenchun

Re: RFR: 8159055: ImageIcon.setImage can't handle null parameter [v2]

2025-06-12 Thread Sergey Bylokhov
On Thu, 12 Jun 2025 06:34:09 GMT, Prasanta Sadhukhan wrote: >> When trying to call 'icon.setImage(null);' where 'icon' is an instance of >> ImageIcon, a null pointer exception is thrown at runtime. >> The code tried to get the `id` for that image and instantiates >> `MediaTracker` to associate

Re: RFR: 8359061: Update and ProblemList manual test java/awt/Cursor/CursorDragTest/ListDragCursor.java [v2]

2025-06-12 Thread Damon Nguyen
On Wed, 11 Jun 2025 22:09:27 GMT, Harshitha Onkar wrote: >> Damon Nguyen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update PL num. Clarify instructions. > > test/jdk/java/awt/Cursor/CursorDragTest/ListDragCursor.java line 52: > >>

Re: RFR: 8359061: Update and ProblemList manual test java/awt/Cursor/CursorDragTest/ListDragCursor.java [v3]

2025-06-12 Thread Damon Nguyen
> This change is to restore the original intent of the test by updating the > instructions to check that the type of Cursor is preserved when clicked and > dragged. Now the test correctly has instructions to check that an I-beam > cursor stays an I-beam until released over a List with its cursor

Re: RFR: 8358623: Avoid unnecessary data copying in ICC_Profile

2025-06-12 Thread Harshitha Onkar
On Wed, 4 Jun 2025 23:39:05 GMT, Sergey Bylokhov wrote: > This PR simplifies several aspects of the ICC_Profile class: > > - [Change > 1](https://github.com/openjdk/jdk/pull/25650/commits/426a608b1df9e39e221d05e7374a3fecf6e6cf30): > The ICC_Profile.getInstance(byte[] data) method used to co

Re: RFR: 8358623: Avoid unnecessary data copying in ICC_Profile

2025-06-12 Thread Harshitha Onkar
On Wed, 4 Jun 2025 23:39:05 GMT, Sergey Bylokhov wrote: > This PR simplifies several aspects of the ICC_Profile class: > > - [Change > 1](https://github.com/openjdk/jdk/pull/25650/commits/426a608b1df9e39e221d05e7374a3fecf6e6cf30): > The ICC_Profile.getInstance(byte[] data) method used to co

Re: RFR: 8354646: java.awt.TextField allows to identify the spaces in a password when double clicked at the starting and end of the text [v17]

2025-06-12 Thread Alexander Zuev
On Tue, 10 Jun 2025 16:22:52 GMT, Jeremy Wood wrote: >> Make sure AquaTextPasswordFieldUI can't use selectWordAction. >> >> The core problem here was we could call selectWordAction in the Aqua LAF on >> a JPasswordField. This problem was already solved in the >> BasicPasswordFieldUI . The same

Integrated: 8354646: java.awt.TextField allows to identify the spaces in a password when double clicked at the starting and end of the text

2025-06-12 Thread Jeremy Wood
On Mon, 26 May 2025 08:32:26 GMT, Jeremy Wood wrote: > Make sure AquaTextPasswordFieldUI can't use selectWordAction. > > The core problem here was we could call selectWordAction in the Aqua LAF on a > JPasswordField. This problem was already solved in the BasicPasswordFieldUI . > The same solu

Re: RFR: 8357799: Improve instructions for JFileChooser/HTMLFileName.java [v3]

2025-06-12 Thread Alexander Zuev
On Tue, 3 Jun 2025 17:11:12 GMT, Alexey Ivanov wrote: >> The instructions for the `javax/swing/JFileChooser/HTMLFileName.java` test >> are still not as clear. >> >> The file name in the instructions is rendered as HTML, which, I believe, is >> unexpected. It should be displayed as the plain te

Re: RFR: 8159055: ImageIcon.setImage can't handle null parameter [v2]

2025-06-12 Thread Alexander Zuev
On Thu, 12 Jun 2025 06:34:09 GMT, Prasanta Sadhukhan wrote: >> When trying to call 'icon.setImage(null);' where 'icon' is an instance of >> ImageIcon, a null pointer exception is thrown at runtime. >> The code tried to get the `id` for that image and instantiates >> `MediaTracker` to associate

Re: RFR: 8358532: JFileChooser in GTK L&F still displays HTML filename [v2]

2025-06-12 Thread Alexander Zuev
On Wed, 11 Jun 2025 10:41:09 GMT, Tejesh R wrote: >> [JDK-8139228](https://bugs.openjdk.org/browse/JDK-8139228) fix missed GTK >> updates for the same issue where file/directory name renders as `HTML text` >> instead of `plain text`. >> Adding the same fix for GTK L&F. >> Test for the fix : tes

Re: RFR: 8358532: JFileChooser in GTK L&F still displays HTML filename [v2]

2025-06-12 Thread Damon Nguyen
On Wed, 11 Jun 2025 10:41:09 GMT, Tejesh R wrote: >> [JDK-8139228](https://bugs.openjdk.org/browse/JDK-8139228) fix missed GTK >> updates for the same issue where file/directory name renders as `HTML text` >> instead of `plain text`. >> Adding the same fix for GTK L&F. >> Test for the fix : tes

Re: RFR: 8358532: JFileChooser in GTK L&F still displays HTML filename [v2]

2025-06-12 Thread Damon Nguyen
On Thu, 12 Jun 2025 11:02:59 GMT, Alexey Ivanov wrote: > > Opposite results of what's instructed. Attached screenshot. > > It is addressed in [JDK-8357799](https://bugs.openjdk.org/browse/JDK-8357799) > fix. So didn't address here. Thanks, missed this. - PR Comment: https://git.o

Re: RFR: 8358532: JFileChooser in GTK L&F still displays HTML filename [v2]

2025-06-12 Thread Alexey Ivanov
On Wed, 11 Jun 2025 10:41:09 GMT, Tejesh R wrote: >> [JDK-8139228](https://bugs.openjdk.org/browse/JDK-8139228) fix missed GTK >> updates for the same issue where file/directory name renders as `HTML text` >> instead of `plain text`. >> Adding the same fix for GTK L&F. >> Test for the fix : tes

Re: RFR: 8131136: java/awt/font/JNICheck/JNICheck.sh issue warning on core-libs code

2025-06-12 Thread Daniel JeliƄski
On Wed, 11 Jun 2025 19:00:45 GMT, Sergey Bylokhov wrote: >> src/java.base/share/native/libnet/net_util.c line 77: >> >>> 75: CHECK_NULL_RETURN(s, JNI_VERSION_1_2); >>> 76: preferIPv4Stack = (*env)->CallStaticBooleanMethod(env, iCls, mid, >>> s); >>> 77: JNU_CHECK_EXCEPTION_RETURN(en

Re: RFR: 8359053: Implement JEP 504 - Remove the Applet API [v6]

2025-06-12 Thread Kevin Rushforth
On Wed, 11 Jun 2025 19:18:15 GMT, Phil Race wrote: >> This is the implementation of JEP 504 - Remove the Applet API. >> API changes are >> - Remove the entire java.applet package >> - Remove the javax/swing/JApplet class >> - Remove applet related APIs in java.beans >> - Update javadoc referring

Re: RFR: 8358532: JFileChooser in GTK L&F still displays HTML filename [v2]

2025-06-12 Thread Alexey Ivanov
On Thu, 12 Jun 2025 06:55:15 GMT, Tejesh R wrote: > > Opposite results of what's instructed. Attached screenshot. > > It is addressed in [JDK-8357799](https://bugs.openjdk.org/browse/JDK-8357799) > fix. So didn't address here. @DamonGuy Yes, this issue is resolved in https://git.openjdk.org/jd

Windows AWT: support for running applications without display?

2025-06-12 Thread Briemann, David
Hi, I was recently asked to investigate this issue: https://bugs.openjdk.org/browse/JDK-8341294 Let me give a summary of the problem here (copied from newest comment in this ticket): # The problem A bugfix (https://bugs.openjdk.org/browse/JDK-8185862) changed the behavior of AWT applicatio

Re: RFR: 8159055: ImageIcon.setImage can't handle null parameter [v2]

2025-06-12 Thread Abhishek Kumar
On Thu, 12 Jun 2025 06:55:12 GMT, Prasanta Sadhukhan wrote: > yes..i will raise it once we are done with this PR approval.. Ok... Can't we just mention in the javadoc that `null image will throw an NPE` and then the code changes are not required? - PR Comment: https://git.openjd

Re: RFR: 8159055: ImageIcon.setImage can't handle null parameter [v2]

2025-06-12 Thread Abhishek Kumar
On Thu, 12 Jun 2025 06:34:09 GMT, Prasanta Sadhukhan wrote: >> When trying to call 'icon.setImage(null);' where 'icon' is an instance of >> ImageIcon, a null pointer exception is thrown at runtime. >> The code tried to get the `id` for that image and instantiates >> `MediaTracker` to associate

Re: RFR: 8159055: ImageIcon.setImage can't handle null parameter [v2]

2025-06-12 Thread Prasanta Sadhukhan
On Thu, 12 Jun 2025 06:34:09 GMT, Prasanta Sadhukhan wrote: >> When trying to call 'icon.setImage(null);' where 'icon' is an instance of >> ImageIcon, a null pointer exception is thrown at runtime. >> The code tried to get the `id` for that image and instantiates >> `MediaTracker` to associate

Re: RFR: 8159055: ImageIcon.setImage can't handle null parameter [v2]

2025-06-12 Thread Prasanta Sadhukhan
On Thu, 12 Jun 2025 06:57:20 GMT, Abhishek Kumar wrote: > > yes..i will raise it once we are done with this PR approval.. > > Ok... Can't we just mention in the javadoc that `null image will throw an > NPE` and then the code changes are not required? No, as I mentioned in the description the M

Re: RFR: 8159055: ImageIcon.setImage can't handle null parameter

2025-06-12 Thread Abhishek Kumar
On Thu, 12 Jun 2025 06:31:04 GMT, Prasanta Sadhukhan wrote: > I feel it's better to inform the user in the spec otherwise application may > not know what will be done with NULL image CSR needed ? - PR Comment: https://git.openjdk.org/jdk/pull/25767#issuecomment-2965347161