code review request: 6330275: Rework the PaddingTest regression test. (was Re: Fwd: jdk_security2 tests)
Stuart Marks
stuart.marks at oracle.com
Fri Jul 8 15:53:25 UTC 2011
On 7/8/11 12:55 AM, Weijun Wang wrote:
> The diff method is now --
>
> private static void diff(String fname1, String fname2) throws Exception {
> if (!Arrays.equals(Files.readAllBytes(new File(fname1).toPath()),
> Files.readAllBytes(new File(fname2).toPath()))) {
> throw new Exception(
> "files " + fname1 + " and " + fname2 + " differ");
> }
> }
>
> I should learn these new JDK 7 classes more. I guess "new File(f).toPath()" is
> the most straight forward way to get a Path object?
I think Paths.get(f) is probably preferable.
Yes, there's a lot of new stuff here in Java 7. I learned all I know about it
from Alan. :-)
s'marks
More information about the security-dev
mailing list