[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-swing-dev
Subject: Re: <Swing Dev> swing-dev Digest, Vol 130, Issue 42
From: Krishna Addepalli <krishna.addepalli () oracle ! com>
Date: 2018-02-22 8:36:23
Message-ID: 40a679a0-4be7-4cb8-9ea5-e57f72880519 () default
[Download RAW message or body]
Hi Jay,
As per the Files.createFile api, it can throw multiple types of exceptions. If it \
throws exception while creating a particular file(say for example 500th file), then \
immediately, your code would start deleting the files assuming that 1000 files were \
created. In that case the test will throw an NPE. I think you should declare the "I" \
variable outside the try block, to keep it accessible in the finally block, and then \
iterate only till that value, rather than 1000.
Thanks,
Krishna
Message: 3
Date: Wed, 21 Feb 2018 22:04:32 -0800 (PST)
From: Jayathirth D V <jayathirth.d.v@oracle.com>
To: Semyon Sadetsky <semyon.sadetsky@oracle.com>,
swing-dev@openjdk.java.net
Subject: Re: <Swing Dev> [11] RFR JDK-8198004:
javax/swing/JFileChooser/6868611/bug6868611.java throws error
Message-ID: <ec9b92d3-a38c-43bf-82d3-e587a651a58a@default>
Content-Type: text/plain; charset="us-ascii"
Hi Semyon,
Thanks for your inputs.
I have moved file deletion logic to finally block.
Please find updated webrev for review:
http://cr.openjdk.java.net/~jdv/8198004/webrev.01/
Thanks,
Jay
From: Semyon Sadetsky
Sent: Thursday, February 22, 2018 7:03 AM
To: Jayathirth D V; swing-dev@openjdk.java.net
Subject: Re: <Swing Dev> [11] RFR JDK-8198004: \
javax/swing/JFileChooser/6868611/bug6868611.java throws error
Hi Jay,
Please delete files in finally block to avoid files stay undeleted in case of \
exception.
--Semyon
On 02/21/2018 03:09 AM, Jayathirth D V wrote:
Hello All,
Please review the following fix in JDK11 :
Bug : https://bugs.openjdk.java.net/browse/JDK-8198004
Webrev : HYPERLINK "http://cr.openjdk.java.net/%7Ejdv/8198004/webrev.00/"http://cr.openjdk.java.net/~jdv/8198004/webrev.00/ \
Issue: If we run javax/swing/JFileChooser/6868611/bug6868611.java it times out and \
throws jtreg error.
Root cause : In the test case we create 1000 files in default temporary directory and \
then call FileSystemView.getFiles() on default temporary directory. But if the same \
temporary directory has been used previously and if contains lot of unnecessary files \
FileSystemView.getFiles() will take lot of time. My machine temp folder had lot of \
files and after I delete major amount of files from temp directory and run the test \
again it passes without any timeout.
Solution: We should not use default temporary directory for creating 1000 files and \
call FileSystemView.getFiles() on same temp folder. Creating sub-folder under default \
temp directory and using it for test case resolves the issue.
Thanks,
Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20180221/791ff15c/attachment.html>
End of swing-dev Digest, Vol 130, Issue 42
******************************************
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic