Very simple code review: 7196677: diff compares same file to itself in PaddingTest regression test.

Weijun Wang weijun.wang at oracle.com
Thu Sep 6 18:46:17 PDT 2012


http://cr.openjdk.java.net/~weijun/7196677/webrev.00/

Thanks
Max


-------- Original Message --------
7196677: diff compares same file to itself in PaddingTest regression test.


=== *Description* 
============================================================
Introduced due to 6330275
Changeset http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c8dbb9e19355

+ private static void diff(String fname1, String fname2) throws Exception {
+ if (!Arrays.equals(Files.readAllBytes(Paths.get(fname1)),
+ Files.readAllBytes(Paths.get(fname1)))) {
+ throw new Exception(
+ "files " + fname1 + " and " + fname2 + " differ");
+ }
+ }


There is a error in the diff, reads n compares fname1 with itself, 
instead of fname2




More information about the security-dev mailing list