Re: RFR: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String

2021-09-09 Thread Sergey Bylokhov
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov wrote: > Using `ByteArrayOutputStream.toString` to convert it's content to a String is > cleaner than `new String(out.toByteArray())`. Also it's a bit faster because > of one less array copy. Looks fine - PR: https://git.openjdk.j

RFR: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String

2021-09-09 Thread Andrey Turbanov
Using `ByteArrayOutputStream.toString` to convert it's content to a String is cleaner than `new String(out.toByteArray())`. Also it's a bit faster because of one less array copy. - Commit messages: - [PATCH] Use ByteArrayOutputStream.toString to convert its content to the String

RFR: 8273366: [testbug] javax/swing/UIDefaults/6302464/bug6302464.java fails on macOS12

2021-09-09 Thread Prasanta Sadhukhan
Test fails on macOS12 since the check was only upto macOS11..Extended the check for BigSurOrAbove. - Commit messages: - Check BigSurOrAbove Changes: https://git.openjdk.java.net/jdk/pull/5434/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5434&range=00 Issue: https:

Re: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v6]

2021-09-09 Thread Prasanta Sadhukhan
> It is seen in macos disabled JMenuItem arrow is not disabled even though > JMenuItem itself is disabled. > In native app, same menuitem arrow is disabled for disabled menuitem. > > Issue is when AquaMenuPainter#paintMenuItem() is called, it tries to draw a > ImageIcon image of the arrow via Im

Re: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v5]

2021-09-09 Thread Prasanta Sadhukhan
On Wed, 8 Sep 2021 20:55:48 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add menuitem checkicon test > > src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java line 235: >

Re: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v5]

2021-09-09 Thread Prasanta Sadhukhan
On Wed, 8 Sep 2021 21:00:09 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add menuitem checkicon test > > src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java line 254: >

Re: RFR: 8273355: Lanai: Flickering on tooltip appearance IntelliJ IDEA 2021.2.1

2021-09-09 Thread Alexey Ushakov
On Sun, 5 Sep 2021 11:49:18 GMT, Alexey Ushakov wrote: >> src/java.desktop/macosx/classes/sun/lwawt/LWWindowPeer.java line 295: >> >>> 293: // Set correct background for a window before making it >>> visible >>> 294: platformWindow.setOpaque(!isTranslucent()); >>> 295:

RFR: 8273135: java/awt/color/ICC_ColorSpace/MTTransformReplacedProfile.java crashes in liblcms.dylib with NULLSeek+0x7

2021-09-09 Thread Sergey Bylokhov
This bug was found by the test added by the https://github.com/openjdk/jdk/pull/5042. The crash is rarely reproduced, and in the default testrun, I was not able to crash it even once. But I have found that if the 1000 tests are executed in parallel a few crashes(less than 10) usually happen. A

Loading FontManager from sun.font.fontmanager property

2021-09-09 Thread Alexander Scherbatiy
Hello, There are two fixes which avoid using reflection during GraphicsEnvironment and Toolkit platform specific classes loading [1], [2]:   8130266 Change the mechanism by which JDK loads the platform-specific GraphicsEnvironment class   8212700 Change the mechanism by which JDK loads the plat

Re: Loading FontManager from sun.font.fontmanager property

2021-09-09 Thread Philip Race
I think it can be, although the problem with the other cases was that they were set by the launcher and always appeared in the enumeration of system properties. This case is not documented and isn't set .. but is an effective waste of code since any kind of external replacement isn't possible w

Re: RFR: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String

2021-09-09 Thread Brian Burkhalter
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov wrote: > Using `ByteArrayOutputStream.toString` to convert it's content to a String is > cleaner than `new String(out.toByteArray())`. Also it's a bit faster because > of one less array copy. Marked as reviewed by bpb (Reviewer). -

Re: RFR: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String

2021-09-09 Thread Xue-Lei Andrew Fan
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov wrote: > Using `ByteArrayOutputStream.toString` to convert it's content to a String is > cleaner than `new String(out.toByteArray())`. Also it's a bit faster because > of one less array copy. Nice catch. The update looks safe and good to me.

Re: RFR: 8273358: macOS Monterey does not have the font Times needed by Serif

2021-09-09 Thread Prasanta Sadhukhan
On Wed, 8 Sep 2021 16:49:26 GMT, Phil Race wrote: > Times has been the hard coded name for Serif in the JDK sources for macOS > since the port was contributed by Apple. > But it seems that macOS Monterey doesn't have this font. > And the hard-coded fallback is also Times ! So we end up returning

Re: RFR: 8273358: macOS Monterey does not have the font Times needed by Serif

2021-09-09 Thread Prasanta Sadhukhan
On Thu, 9 Sep 2021 16:50:20 GMT, Prasanta Sadhukhan wrote: >> Times has been the hard coded name for Serif in the JDK sources for macOS >> since the port was contributed by Apple. >> But it seems that macOS Monterey doesn't have this font. >> And the hard-coded fallback is also Times ! So we en

Re: RFR: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String

2021-09-09 Thread Sergey Bylokhov
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov wrote: > Using `ByteArrayOutputStream.toString` to convert it's content to a String is > cleaner than `new String(out.toByteArray())`. Also it's a bit faster because > of one less array copy. Marked as reviewed by serb (Reviewer).

Re: RFR: 8273358: macOS Monterey does not have the font Times needed by Serif

2021-09-09 Thread Phil Race
On Thu, 9 Sep 2021 16:56:57 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/macosx/classes/sun/font/CFontManager.java line 228: >> >>> 226: >>> 227: setupLogicalFonts("Dialog", defaultFont, defaultFallback); >>> 228: setupLogicalFonts("Serif", "Times", "Times New Rom

Re: RFR: 8273358: macOS Monterey does not have the font Times needed by Serif

2021-09-09 Thread Phil Race
On Thu, 9 Sep 2021 16:50:56 GMT, Prasanta Sadhukhan wrote: >> Times has been the hard coded name for Serif in the JDK sources for macOS >> since the port was contributed by Apple. >> But it seems that macOS Monterey doesn't have this font. >> And the hard-coded fallback is also Times ! So we en

Re: RFR: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String

2021-09-09 Thread Сергей Цыпанов
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov wrote: > Using `ByteArrayOutputStream.toString` to convert it's content to a String is > cleaner than `new String(out.toByteArray())`. Also it's a bit faster because > of one less array copy. Marked as reviewed by stsypa...@github.com (no known

Re: RFR: 8205137: Remove Applet support from SwingSet2

2021-09-09 Thread Alexey Ivanov
On Thu, 9 Sep 2021 03:46:00 GMT, Phil Race wrote: > > > The files that have JUST a (c) date update should all be reverted. You > > > haven't touched them so there is nothing to (c). > > > > > > I just removed the java.applet.* import for all of them. Should I revert > > the date if there's no

Re: RFR: 8205137: Remove Applet support from SwingSet2

2021-09-09 Thread Alexey Ivanov
On Wed, 8 Sep 2021 22:32:28 GMT, Sergey Bylokhov wrote: > Probably the README in the "jdk/src/demo/share/" should be updated as well? SwingSet2/README should also be updated. - PR: https://git.openjdk.java.net/jdk/pull/5401

Re: RFR: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String

2021-09-09 Thread Alexey Ivanov
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov wrote: > Using `ByteArrayOutputStream.toString` to convert it's content to a String is > cleaner than `new String(out.toByteArray())`. Also it's a bit faster because > of one less array copy. Marked as reviewed by aivanov (Reviewer). -

Re: RFR: 8273366: [testbug] javax/swing/UIDefaults/6302464/bug6302464.java fails on macOS12

2021-09-09 Thread Alexey Ivanov
On Thu, 9 Sep 2021 07:19:27 GMT, Prasanta Sadhukhan wrote: > Test fails on macOS12 since the check was only upto macOS11..Extended the > check for BigSurOrAbove. Marked as reviewed by aivanov (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/5434

Re: RFR: 8273478: [macos11] JTabbedPane selected and pressed tab is not legible

2021-09-09 Thread Alexander Zuev
On Wed, 8 Sep 2021 09:00:47 GMT, Prasanta Sadhukhan wrote: > On macOS 11 (bigsur), using the Swing Aqua Look and Feel, > the text of the selected and "pressed" JTabbedPane tab title text is just a > light gray outline of white text on a white background which is not readable. > Fix is to use s

Re: RFR: 8273358: macOS Monterey does not have the font Times needed by Serif

2021-09-09 Thread Alexey Ivanov
On Wed, 8 Sep 2021 16:49:26 GMT, Phil Race wrote: > Times has been the hard coded name for Serif in the JDK sources for macOS > since the port was contributed by Apple. > But it seems that macOS Monterey doesn't have this font. > And the hard-coded fallback is also Times ! So we end up returning

Re: RFR: 8273478: [macos11] JTabbedPane selected and pressed tab is not legible

2021-09-09 Thread Alexey Ivanov
On Wed, 8 Sep 2021 09:00:47 GMT, Prasanta Sadhukhan wrote: > On macOS 11 (bigsur), using the Swing Aqua Look and Feel, > the text of the selected and "pressed" JTabbedPane tab title text is just a > light gray outline of white text on a white background which is not readable. > Fix is to use s

Integrated: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String

2021-09-09 Thread Andrey Turbanov
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov wrote: > Using `ByteArrayOutputStream.toString` to convert it's content to a String is > cleaner than `new String(out.toByteArray())`. Also it's a bit faster because > of one less array copy. This pull request has now been integrated. Changese

Re: RFR: 8273528: Avoid ByteArrayOutputStream.toByteArray when converting stream to String

2021-09-09 Thread Sergey Bylokhov
On Thu, 2 Sep 2021 20:19:40 GMT, Andrey Turbanov wrote: > Using `ByteArrayOutputStream.toString` to convert it's content to a String is > cleaner than `new String(out.toByteArray())`. Also it's a bit faster because > of one less array copy. BTW If it is not urgent I suggest to wait 24 hours f

Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-09-09 Thread Mandy Chung
On Fri, 3 Sep 2021 17:19:05 GMT, Phil Race wrote: > Hmm I was under the impression this was removing AppContext itself but it is > just removing the backdoor needed by logging > Perhaps this isn't the change that requires the CSR but it then leaves an > inconsistent state where desktop supports

Re: [+AWTFont nsFontForJavaFont:env:]

2021-09-09 Thread Alan Snyder
As no one is claiming ownership, should it be removed? Or is it expected to have some use in the future? > On Sep 8, 2021, at 3:50 PM, Michael Hall wrote: > > > >> On Sep 8, 2021, at 11:23 AM, Alan Snyder wrote: >> >> Is this method obsolete? >> >> I’m not finding any uses. (Actually, IDE

Re: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging

2021-09-09 Thread Sergey Bylokhov
On Wed, 1 Sep 2021 06:31:16 GMT, Sergey Bylokhov wrote: > The "java.util.logging.LogManager" class uses the "threadgroup sandboxing" > via an AppContext to support "applet logging isolation". The AppContext class > became useless since the plugin and webstart are no longer supported and > remo

Re: RFR: 8273478: [macos11] JTabbedPane selected and pressed tab is not legible

2021-09-09 Thread Sergey Bylokhov
On Wed, 8 Sep 2021 09:00:47 GMT, Prasanta Sadhukhan wrote: > On macOS 11 (bigsur), using the Swing Aqua Look and Feel, > the text of the selected and "pressed" JTabbedPane tab title text is just a > light gray outline of white text on a white background which is not readable. > Fix is to use s

Re: RFR: 8268084: [macos] Disabled JMenuItem arrow is not disabled [v5]

2021-09-09 Thread Sergey Bylokhov
On Thu, 9 Sep 2021 07:41:06 GMT, Prasanta Sadhukhan wrote: >> src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java line 254: >> >>> 252: >>> 253: @Override >>> 254: public Icon getInvertedIcon() { >> >> When we draw result of this method? Is it possible that we

Re: RFR: 8271923: [macos] the text color on the selected disabled tabbed pane button remains white making text unreadable [v2]

2021-09-09 Thread Sergey Bylokhov
On Thu, 9 Sep 2021 05:10:29 GMT, Prasanta Sadhukhan wrote: > I raised https://git.openjdk.java.net/jdk/pull/5409 for the "pressed" issue > on BigSur. Thank you! - PR: https://git.openjdk.java.net/jdk/pull/5217

Integrated: 8272148: JDesktopPane:getComponentCount() returns one extra than expected with GTKLookAndFeel

2021-09-09 Thread Pankaj Bansal
On Mon, 16 Aug 2021 08:22:35 GMT, Pankaj Bansal wrote: > A container may include few default components as children, which are added > to it during creation. Due to this, calling function getChildrenCount on a > new created instance may return non zero value. This behaviour may vary > accordin