RFR: 8059976 Convert JavacFileManager to use java.nio.file internally

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Dec 9 03:10:57 UTC 2015



On 12/07/2015 01:09 PM, Liam Miller-Cushon wrote:
> On Tue, Aug 25, 2015 at 4:42 PM, Jonathan Gibbons 
> <jonathan.gibbons at oracle.com <mailto:jonathan.gibbons at oracle.com>> wrote:
>
>     I'd be particularly interested in feedback from folk developing
>     custom file managers based on top of nio FileSystems.
>
>
> Sorry for the belated feedback. I just migrated some tests from 
> JavacPathFileManager to use these changes, and the only issue I 
> encountered is that JavacFileManager#asPath doesn't handle 
> PathFileObjects. I think it's just missing:
>
> } else if (file instanceof PathFileObject) {
>     return ((PathFileObject) file).getPath();
>
> Everything else looks great.
>
> Thanks!

Thanks for the feedback.  As for .asPath, the recent changeset for 
8059976 [1] covered this:

     @Override @DefinedBy(Api.COMPILER)
     public Path asPath(FileObject file) {
         if (file instanceof PathFileObject) {
             return ((PathFileObject) file).path;
         } else
             throw new IllegalArgumentException(file.getName());
     }


-- Jon

[1] http://hg.openjdk.java.net/jdk9/dev/langtools/rev/30e288cb2d22
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20151208/1909a5e8/attachment.html>


More information about the compiler-dev mailing list