RFR(JDK 12/NIO) 8202285: (fs) Add a method to Files for comparing file contents

Joe Wang huizhe.wang at oracle.com
Tue Oct 16 18:10:32 UTC 2018


Hi Daniel,

@linkplain it is!  Thanks!  And yes, int totalRead was fixed in the 
previous webrevs.

Current version:
specdiff: 
http://cr.openjdk.java.net/~joehw/jdk12/8202285/specdiff_v04/java/nio/file/Files.html 

webrevs: http://cr.openjdk.java.net/~joehw/jdk12/8202285/webrev_v04/

Previous version:
specdiff: 
http://cr.openjdk.java.net/~joehw/jdk12/8202285/specdiff_v03/java/nio/file/Files.html 

webrevs: http://cr.openjdk.java.net/~joehw/jdk12/8202285/webrev_v03/

Best regards,
Joe

On 10/16/18, 2:11 AM, Daniel Fuchs wrote:
> Hi Joe,
>
> There are a few places where {@linkplain } should be used instead
> of {@link }. For instance:
>
> 1545      * <li> The two paths locate the {@link #isSameFile(Path, 
> Path) same file},
>
> This should be {@linkplain } - for the record {@link } will format the
> text as code, {@linkplain } will format it as regular text. Since the
> text of the link is "same file" then it should be formatted as regular
> text - not as code.
>
> The link on the next line should probably be {@linkplain } as well.
>
> Otherwise looks good to me (except for the declaration of
> int totalRead that should be long but Alan already mentioned it).
>
> best regards,
>
> -- daniel
>
>
> On 12/10/2018 20:16, Joe Wang wrote:
>> Here's an update based on all of the great reviews and comments 
>> (thanks all!):
>>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8202285
>> CSR: https://bugs.openjdk.java.net/browse/JDK-8202302
>>
>> Current version:
>> specdiff: 
>> http://cr.openjdk.java.net/~joehw/jdk12/8202285/specdiff_02/java/nio/file/Files.html 
>>
>> webrevs: http://cr.openjdk.java.net/~joehw/jdk12/8202285/webrev_v02/
>>
>> Previous version:
>> specdiff: 
>> http://cr.openjdk.java.net/~joehw/jdk12/8202285/specdiff_v01/java/nio/file/Files.html 
>>
>> webrevs: http://cr.openjdk.java.net/~joehw/jdk12/8202285/webrev_v01/
>>
>> It's been a while, so here's a summary of what's changed:
>>
>> Spec: Alan's patch to fix inconsistencies in wording/terminology
>> Impl: s/mismatchByAttrs and etc/isSameFile;
>>           Stick with the simple implementation (InputStream/Buffer) 
>> for now. Further improvement may be done if there's a need;
>>           The impl is smaller than the previous version, merged the 
>> code into Files, removed FilesMismatch.java;
>>
>> Test: more readable variables instead of the array of test files
>>           more comments on the testcases
>>           improved the private methods used for generating the test 
>> files
>>
>> Thanks,
>> Joe
>


More information about the core-libs-dev mailing list