Heads-up: jigsaw sync with JDK 7 b130
Mandy Chung
mandy.chung at oracle.com
Fri Mar 4 09:53:44 PST 2011
On 3/4/11 4:23 AM, Alan Bateman wrote:
> Mandy Chung wrote:
>> I finish sync'ing up jigsaw with JDK 7 b130 (Milestone 12) and will
>> be pushing the changesets to the jigsaw repository tomorrow or over
>> the weekend (I'm currently waiting for my jprt testing job to finish).
>>
>> These 2 webrevs show the files that require manual merges:
>>
>> http://cr.openjdk.java.net/~mchung/jigsaw/webrevs/b130-merge/langtools/
>> http://cr.openjdk.java.net/~mchung/jigsaw/webrevs/b130-merge/jdk/
>>
>> Here are a few fixes worth mentioning:
>> o Fix CacheFSInfo
>> <http://cr.openjdk.java.net/%7Emchung/jigsaw/webrevs/b130-merge/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java.udiff.html>
>> for 7018098 "CacheFSInfo persists too long" found during the merge
>> o Fix NPE thrown by org.openjdk.jigsaw.Loader
>> <http://cr.openjdk.java.net/%7Emchung/jigsaw/webrevs/b130-merge/jdk/src/share/classes/org/openjdk/jigsaw/Loader.java.udiff.html>
>> when a class is not found while mid == 0
>> o Also made corresponding change per NIO 2 spec update.
>>
>> Mandy
> I went through the webrev of the jdk changes and everything looks okay
> to me. A couple of small comments on the NIO2 usages:
>
> Packager.createTempWorkDir - you can replace most of this with
> Files.createTempDirectory("jigsaw",null).
>
> PublishedRepository.storeCatalogWhileLocked - you can use
> try-with-resources here. Also with the move method, the
> REPLACE_EXISTING option is ignored with ATOMIC_MOVE. Same thing in the
> publish method.
>
> PublishedRepository.java L327 - I assume you can replace
> modp.getName(modp.getNameCount()-1) with modp.getFileName(). There's
> another one in test/org/openjdk/jigsaw/_PublishedRepository.java.
>
> TrivialWebServer.copy - you can replace this code with Files.copy(p, out)
>
> test/org/openjdk/jigsaw/_PublishedRepository.java L111 - looks like
> this leaves the file open.
>
Thanks for the feedback, Alan. This webrev shows this additional change:
http://cr.openjdk.java.net/~mchung/jigsaw/webrevs/b130-merge/jdk.01/
As for the Packager class, I will leave it for my next patch to clean
up. It's currently using org.openjdk.jigsaw.Files utility class and
Packager has more opportunity to use NIO2. In addition, there are other
places that can use try-with-resources.
Mandy
More information about the jigsaw-dev
mailing list