Code Review Request for two pass signing

Alan Bateman Alan.Bateman at oracle.com
Tue Apr 19 06:21:17 PDT 2011


Sean Mullan wrote:
> I have modified the signed module implementation to generate a signed 
> module file in two passes, which avoids the signature length issues 
> mentioned in a previous thread [1].
>
> I also enhanced some of the code to use the new JDK 7 
> try-with-resource and multi-catch language features.
>
> webrev: 
> http://cr.openjdk.java.net/~mullan/jigsaw/webrevs/twopass-sign/webrev.00/
Sean - I went through the webrev. The approach make sense to me although 
I think we should put ModuleFileFormat on a list to clean-up at some point.

At L159 and L168 you use transferTo to copy the sections but that method 
may transfer less than requested. I don't think it will for the 
file->file case here (except when there is an error) but just mentioning 
it.

At L176 I assume this should be Files.delete(f.toPath()) as I assume it 
doesn't compile as is.

I see you've changed many existing places to use try-with-resources 
(which is good) and one thing we could do too is replace most of these 
places with Files.copy.

-Alan.



More information about the jigsaw-dev mailing list