On Fri, 26 Aug 2022 14:30:10 GMT, Abhishek Kumar <[email protected]> wrote:

>> JFileChooser - empty file size issue fixed. 
>> For empty file, now the size 0 KB.
>> Manual Test Case "FileSizeCheck.java" created.
>
> Abhishek Kumar has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Updated as per suggested changes

AK > Since we are displaying file size in one decimal precision, files having 
size from 1 to 199 byte will be 0.1 KB.

PR > Yes, I see that. My point is it seems wrong.
 
AK > Can you please suggest me what should I do to handle 1 byte to199 bytes ?

PR : Just consistently round up 
- 0 bytes is 0 kb
- 1-100 bytes is 0.1 kb
- 101-199 bytes is 0.2 kb
- 901 -1000 bytes is 1kb
and so on

-------------

PR: https://git.openjdk.org/jdk/pull/9327

Reply via email to