[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-compiler-dev
Subject: Re: RFR: 8059976 Convert JavacFileManager to use java.nio.file internally
From: Jonathan Gibbons <jonathan.gibbons () oracle ! com>
Date: 2015-12-09 3:10:57
Message-ID: 56679BC1.1050307 () oracle ! com
[Download RAW message or body]
On 12/07/2015 01:09 PM, Liam Miller-Cushon wrote:
> On Tue, Aug 25, 2015 at 4:42 PM, Jonathan Gibbons
> <jonathan.gibbons@oracle.com <mailto:jonathan.gibbons@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
[Attachment #3 (text/html)]
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
<div class="moz-cite-prefix">On 12/07/2015 01:09 PM, Liam
Miller-Cushon wrote:<br>
</div>
<blockquote
cite="mid:CAL4Qsgtkq5=-PLLA6Kkeca1Ej5fai1MHL749rVv4kCYjGFUucQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Aug 25, 2015 at 4:42 PM,
Jonathan Gibbons <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:jonathan.gibbons@oracle.com"
target="_blank">jonathan.gibbons@oracle.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I'd
be particularly interested in feedback from folk
developing custom file managers based on top of nio
FileSystems.</blockquote>
</div>
<br>
Sorry for the belated feedback. I just migrated some tests
from JavacPathFileManager to use these changes<span
style="font-size:12.8px">, and the only </span><span
style="font-size:12.8px">issue I encountered is
that JavacFileManager#asPath doesn't handle </span>PathFileObjects.
I think it's just missing:
<div>
<div><span style="font-size:12.8px"><br>
</span></div>
} else if (file instanceof PathFileObject) {
<div> return ((PathFileObject) file).getPath();</div>
</div>
<div><br>
</div>
<div>Everything else looks great. </div>
<div><br>
</div>
<div>Thanks!<br>
</div>
</div>
</div>
</blockquote>
<br>
Thanks for the feedback. As for .asPath, the recent changeset for
8059976 [1] covered this:<br>
<pre class="sourcelines stripes4 wrap">
<span id="l824"> @Override @DefinedBy(Api.COMPILER)</span>
<span id="l825"> public Path asPath(FileObject file) {</span>
<span id="l826"> if (file instanceof PathFileObject) {</span>
<span id="l827"> return ((PathFileObject) file).path;</span>
<span id="l828"> } else</span>
<span id="l829"> throw new \
IllegalArgumentException(file.getName());</span> <span id="l830"> }</span></pre>
<br>
-- Jon<br>
<br>
[1] <a class="moz-txt-link-freetext" \
href="http://hg.openjdk.java.net/jdk9/dev/langtools/rev/30e288cb2d22">http://hg.openjdk.java.net/jdk9/dev/langtools/rev/30e288cb2d22</a><br>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic