<Swing Dev> [10] Review request for 8182041: File Chooser Shortcut Panel folders under on JDK 9

Semyon Sadetsky semyon.sadetsky at oracle.com
Wed Dec 6 17:39:34 UTC 2017

On 12/06/2017 08:33 AM, Phil Race wrote:

> Hi,
> I have some additional comments on this old review thread. Hopefully 
> we can close it out soon
> although it will need a CSR whatever ..
> Since the implementation of ShellFolderManager filters out 
> inaccessible files we
> should document this somewhere.
> I suggest either on the class or relevant methods saying something like
> "Files or resources which are not accessible in the current security 
> context
> may be filtered out from the returned set".
> The word "may" is key here ..
This looks to me like implementation details. I agree that it is worth 
to mention this problematic in the method spec but since it is a generic 
method for different platforms it probably should be given in a 
different form than a particular platform specific solution. If the 
entries of the list are virtual they may not have any file system 
permissions at all.
> If we are sure that this is always the case then it would follow that 
> SecurityException
> does not need to be documented.
> Consistency would suggest that then this policy would extend to the 
> other methods
> added in JDK 9 which declare that exception. So all or none.
> Being a RuntimeException that is not checked I think we can compatibly 
> remove those.
This is not consistent with other JDK classes in which the 
SecurityException is always mentioned, for example, the java.awt.Desktop 
class and there are many others. I think it would be non-practical to 
rewrite all other specs because you've changed your mind in this 
particular fix review.
Also, in this fix review [1]  you brought an opposite point of view.



> -phil.
> On 10/24/2017 09:22 PM, Alexander Zvegintsev wrote:
>> Hi Semyon,
>> the fix looks good to me, but I found a minor typo in the test:
>> testShortcatPanelFiles -> testShortcutPanelFiles
>> no need for a new webrev
>> Thanks,
>> Alexander.
>> On 04/10/2017 00:41, Semyon Sadetsky wrote:
>>> Hello,
>>> Please review fix for JDK10 (the changes involve AWT and Swing):
>>> bug: https://bugs.openjdk.java.net/browse/JDK-8182041
>>> webrev: http://cr.openjdk.java.net/~ssadetsky/8182041/webrev.00/
>>> New API method was added letting to query shortcut panel entries for 
>>> JFileChooser.
>>> --Semyon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20171206/3e8aaeb5/attachment.html>

More information about the swing-dev mailing list