[9] request for review: 8049171: Additional tests for jarsigner's warnings

Wang Weijun weijun.wang at oracle.com
Wed Jan 21 08:29:25 UTC 2015


Thanks for adding so many tests. Some suggestions:

- JarUtils.java

You can use the new InputStream.transferTo() method.

I am not sure if I understand updateJar correctly. It looks like srcJarFile is opened multiple times so its entries are duplicated a lot in the destination. Or is there a secret break?

- Utils.java

The mixed using of File and Files is strange, but you are free to keep it.

- TimestampCheck.java

You can make Handler Autocloseable to use try-with-resources in tests.

- Various tests

I am not a fan of calling Utils.cleanup() in final block. Unless you have created huge garbages, those files are precious when the test fails (given you provide -retain in jtreg, which I always do).

Thanks
Max

> On Jan 21, 2015, at 14:35, Artem Smotrakov <artem.smotrakov at oracle.com> wrote:
> 
> Hello,
> 
> Please review a couple of new tests for jarsigner's warnings. Basically tests run jarsigner and check warning/error messages and exit codes according to [1].
> 
> https://bugs.openjdk.java.net/browse/JDK-8049171
> http://cr.openjdk.java.net/~asmotrak/8049171/webrev.00
> 
> [1] http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html
> 
> Artem
> 
> 




More information about the security-dev mailing list