Re: RFR: 6257207: JTable.getDefaultEditor throws NullPointerException

2022-10-27 Thread Tejesh R
On Wed, 26 Oct 2022 10:28:21 GMT, Prasanta Sadhukhan wrote: > If getDefaultEditor() is called before the JTable model is setup, it results > in NPE. > > This is because when JTable sets its model, which ends up firing a table > changed event. The testcase is listening for tableChanged events

Re: RFR: 6201035: Undefined behavior of MatteBorder Ctors [v3]

2022-10-27 Thread Prasanta Sadhukhan
On Thu, 27 Oct 2022 22:41:26 GMT, Sergey Bylokhov wrote: >> src/java.desktop/share/classes/javax/swing/border/MatteBorder.java line 79: >> >>> 77: * @param matteColor the color rendered for the border >>> 78: * @throws {@code NullPointerException} if {@code borderInsets} >>> 79: *

Re: RFR: 6201035: Undefined behavior of MatteBorder Ctors [v4]

2022-10-27 Thread Prasanta Sadhukhan
> The behavior of MatteBorder constructors taking Insets object as a parameter > is undocumented. It would throw NPE if null object is passed to it, which > should be documented in the spec. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last

Re: RFR: 6187113: DefaultListSelectionModel.removeIndexInterval(0, Integer.MAX_VALUE) fails [v9]

2022-10-27 Thread Prasanta Sadhukhan
On Fri, 28 Oct 2022 03:32:18 GMT, Prasanta Sadhukhan wrote: >> DefaultListSelectionModel.removeIndexInterva accepts `int` value which >> allows it to take in Integer.MAX_VALUE theoratically but it does calculation >> with that value which can results in IOOBE. >> Fix is to make sure the calcul

Re: RFR: 6187113: DefaultListSelectionModel.removeIndexInterval(0, Integer.MAX_VALUE) fails [v9]

2022-10-27 Thread Prasanta Sadhukhan
> DefaultListSelectionModel.removeIndexInterva accepts `int` value which allows > it to take in Integer.MAX_VALUE theoratically but it does calculation with > that value which can results in IOOBE. > Fix is to make sure the calculation stays within bounds. Prasanta Sadhukhan has updated the pull

Re: RFR: 8294321: Fix typos in files under test/jdk/java, test/jdk/jdk, test/jdk/jni [v2]

2022-10-27 Thread Chris Plummer
On Fri, 7 Oct 2022 12:51:26 GMT, Alan Bateman wrote: >> Michael Ernst has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains six commits: >> >> - Reinstate typos in Apache code that is copied into the JDK >> - Merge ../jdk-openjdk into

Re: RFR: 8295006: Colored text is not shown on disabled checkbox and radio button with GTK LAF for bug4314194. [v2]

2022-10-27 Thread Sergey Bylokhov
On Wed, 19 Oct 2022 07:13:44 GMT, Abhishek Kumar wrote: >> Existing test >> `open/test/jdk/javax/swing/JRadioButton/4314194/bug4314194.java` was not >> showing colored text for disabled checkbox and radiobutton in GTK LAF. >> >> The fix is to get the disabled state color for checkbox and radio

Re: RFR: 8282463: javax/sound/sampled/Clip/DataPusherThreadCheck.java fails

2022-10-27 Thread Sergey Bylokhov
On Sat, 15 Oct 2022 13:03:26 GMT, Andrey Turbanov wrote: > Test failed on Ubuntu, because both implementations of `MixerProvider` have > no devices: > 1. com.sun.media.sound.DirectAudioDeviceProvider#nGetNumDevices returns `0` > ![DirectAudioDeviceProvider > init](https://user-images.githubuse

Re: RFR: 6201035: Undefined behavior of MatteBorder Ctors [v3]

2022-10-27 Thread Sergey Bylokhov
On Thu, 27 Oct 2022 16:05:19 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> revert typo > > src/java.desktop/share/classes/javax/swing/border/MatteBorder.java line 79: > >> 77: * @pa

Re: RFR: JDK-8252075: Documentation error in LayoutManager2 interface

2022-10-27 Thread SWinxy
On Tue, 4 Oct 2022 07:00:04 GMT, Renjith Kannath Pariyangad wrote: > Updated the documentation with proper meaningful message for better > understanding. Marked as reviewed by swi...@github.com (no known OpenJDK username). @Renjithkannath you need to begin the comment with `/covered`. Could y

RFR: JDK-8252075: Documentation error in LayoutManager2 interface

2022-10-27 Thread Renjith Kannath Pariyangad
Updated the documentation with proper meaningful message for better understanding. - Commit messages: - JDK-8252075 : Documentation error in LayoutManager2 interface Changes: https://git.openjdk.org/jdk/pull/10549/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10549&range=

RFR: 8295812: Skip the "half float" support in LittleCMS during the build

2022-10-27 Thread Sergey Bylokhov
The Java2d do not use "half" float in the image layouts, so we can disable it in the LittleCMS library during the build. It is possible to do using [this](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/native/liblcms/lcms2.h#L85) public option: // Uncomment to get rid of the

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Rob Leland
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote: > Deprecate URL constructors. Developers are encouraged to use `java.net.URI` > to parse or construct any URL. > > The `java.net.URL` class does not itself encode or decode any URL components > according to the escaping mechanism defined in

Re: RFR: 8282958: Rendering issues of borders, TextFields on Windows High-DPI systems

2022-10-27 Thread Alexey Ivanov
On Wed, 12 Oct 2022 16:41:52 GMT, Rajat Mahajan wrote: > This fix is based on a similar approach as described here > https://github.com/openjdk/jdk/pull/7449#issuecomment-1068218648. > We rescale the line border to render the Textfield border correctly, so that > all sides of the Textfield bor

Integrated: 8295323: Unnecessary HashTable usage in StyleSheet

2022-10-27 Thread Andrey Turbanov
On Sat, 1 Oct 2022 16:53:17 GMT, Andrey Turbanov wrote: > Hashtable was used only from single thread. And only non-null key/values > added to it. We can safely replace it with HashSet. This pull request has now been integrated. Changeset: 907d5833 Author:Andrey Turbanov URL: https:

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Daniel Fuchs
On Thu, 27 Oct 2022 17:50:37 GMT, Andrey Turbanov wrote: >> Deprecate URL constructors. Developers are encouraged to use `java.net.URI` >> to parse or construct any URL. >> >> The `java.net.URL` class does not itself encode or decode any URL components >> according to the escaping mechanism de

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Andrey Turbanov
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote: > Deprecate URL constructors. Developers are encouraged to use `java.net.URI` > to parse or construct any URL. > > The `java.net.URL` class does not itself encode or decode any URL components > according to the escaping mechanism defined in

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Daniel Fuchs
On Thu, 27 Oct 2022 17:20:04 GMT, Joe Wang wrote: > Hi Daniel, if it's not a major improvement, we'd like to keep the java.xml > module at the JDK 8 code level. Can we remove the 'var' usage in a few > java.xml classes? No problem - I will make this change when we have settled on a name for th

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Joe Wang
On Wed, 26 Oct 2022 16:00:56 GMT, Daniel Fuchs wrote: > Deprecate URL constructors. Developers are encouraged to use `java.net.URI` > to parse or construct any URL. > > The `java.net.URL` class does not itself encode or decode any URL components > according to the escaping mechanism defined in

Re: RFR: 6201035: Undefined behavior of MatteBorder Ctors [v3]

2022-10-27 Thread Alexey Ivanov
On Wed, 26 Oct 2022 10:48:48 GMT, Prasanta Sadhukhan wrote: >> The behavior of MatteBorder constructors taking Insets object as a parameter >> is undocumented. It would throw NPE if null object is passed to it, which >> should be documented in the spec. > > Prasanta Sadhukhan has updated the p

Re: RFR: 6201035: Undefined behavior of MatteBorder Ctors [v3]

2022-10-27 Thread Phil Race
On Wed, 26 Oct 2022 10:48:48 GMT, Prasanta Sadhukhan wrote: >> The behavior of MatteBorder constructors taking Insets object as a parameter >> is undocumented. It would throw NPE if null object is passed to it, which >> should be documented in the spec. > > Prasanta Sadhukhan has updated the p

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Daniel Fuchs
On Thu, 27 Oct 2022 09:17:29 GMT, Michael McMahon wrote: >> Having unnamed local variables[^1] would probably be best for this. >> >> [^1]: https://openjdk.org/jeps/8294349 > > How about `_unused` or `_unused1`, `_unused2` then in the meantime? I'd be happy to make the change. Let's wait to see

Re: RFR: 8271846 a11y API lacks setSelectedIndex method [v2]

2022-10-27 Thread Artem Semenov
On Wed, 11 May 2022 12:49:34 GMT, Artem Semenov wrote: >> A11Y implementation on macOS has to directly call the >> 'JList.setSelectedIndex' method in order to request selection on an item >> (see 'CAccessibility.requestSelection'). The reason is that a11y API lacks >> appropriate method.There'

Re: RFR: 6972078: Can not select single directory with GTKLookAndFeel [v2]

2022-10-27 Thread Abhishek Kumar
On Thu, 27 Oct 2022 09:27:00 GMT, Prasanta Sadhukhan wrote: > > > Can you also please test it works ok (or atleast not regress) for other > > > selection mode FILES_ONLY, DIRECTORIES_ONLY in the test? > > > > > > Verified for file selection mode of `DIRECTORIES_ONLY`, test passed for all > >

Re: RFR: 6972078: Can not select single directory with GTKLookAndFeel [v2]

2022-10-27 Thread Prasanta Sadhukhan
On Thu, 27 Oct 2022 08:37:48 GMT, Abhishek Kumar wrote: > > Can you also please test it works ok (or atleast not regress) for other > > selection mode FILES_ONLY, DIRECTORIES_ONLY in the test? > > Verified for file selection mode of `DIRECTORIES_ONLY`, test passed for all > LAFs. > > In case

Re: RFR: 8294241: Deprecate URL public constructors

2022-10-27 Thread Michael McMahon
On Thu, 27 Oct 2022 05:14:19 GMT, ExE Boss wrote: >> src/java.base/share/classes/java/net/JarURLConnection.java line 177: >> >>> 175: @SuppressWarnings("deprecation") >>> 176: var tmp = jarFileURL = new URL(spec.substring(0, separator++)); >>> 177: >> >> I realise that @Suppres

Re: RFR: 6972078: Can not select single directory with GTKLookAndFeel [v2]

2022-10-27 Thread Abhishek Kumar
On Thu, 27 Oct 2022 05:48:53 GMT, Prasanta Sadhukhan wrote: > Also, please see if > [JDK-4912623](https://bugs.openjdk.org/browse/JDK-4912623) is related and > fixed by this? Ok, I will check. - PR: https://git.openjdk.org/jdk/pull/10866

Re: RFR: 6972078: Can not select single directory with GTKLookAndFeel [v2]

2022-10-27 Thread Abhishek Kumar
On Thu, 27 Oct 2022 04:00:35 GMT, Prasanta Sadhukhan wrote: > Can you also please test it works ok (or atleast not regress) for other > selection mode FILES_ONLY, DIRECTORIES_ONLY in the test? Verified for file selection mode of `DIRECTORIES_ONLY`, test passed for all LAFs. In case of select

Re: RFR: 6972078: Can not select single directory with GTKLookAndFeel [v3]

2022-10-27 Thread Abhishek Kumar
> While using a JFileChooser with the file selection mode FILES_AND_DIRECTORIES > and multiSelection enabled, it is impossible to select a single directory in > GTK LAF. > > The condition check has been modified when multiselection is enabled and user > has selected single directory. > After th