On Tue, 23 Mar 2021 05:00:45 GMT, Prasanta Sadhukhan <[email protected]>
wrote:
>> Alexander Zvegintsev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> allow empty text
>
> src/java.desktop/macosx/classes/com/apple/laf/AquaFileChooserUI.java line
> 2059:
>
>> 2057: final String tooltipText =
>> fc.getApproveButtonToolTipText();
>> 2058: if (tooltipText != null) {
>> 2059: if (!tooltipText.isEmpty()) return tooltipText;
>
> In other L&F like Metal, Basic even empty text is allowed.. there's no check
> for isEmpty()....Should we do the same here too?
Yes, I think it would be better to allow to set empty text to conform with
other LaF behavior.
Also `JFileChooser.getApproveButtonText()` and
`JFileChooser.getApproveButtonToolTipText()` will now return correct values for
empty strings.
e.g. before the fix if we call `setApproveButtonText("")` subsequent call to
`getApproveButtonText()` will return passed string, but in fact fallback string
is used.
I've also labeled the issue with `noreg-hard`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3136