JDK 9 RFR of 8150204: (fs) Enhance java/nio/file/Files/probeContentType/Basic.java debugging output

Brian Burkhalter brian.burkhalter at oracle.com
Fri Feb 19 20:10:09 UTC 2016


On Feb 19, 2016, at 8:28 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:

>> I'm curious about the use of GetPropertyAction as I don't think this test runs with a security manager.
> 
> I duped it from elsewhere.
> 
>> If it's needed then this might be better:
>> 
>>        PrivilegedAction<String> pa = () -> System.getProperty("user.home");
>>        String value = AccessController.doPrivileged(pa);
>> 
>> and it will avoid needing to add @modules to this test.
>> 
>> It might be cleaner if you can fit this on one line:
>> 
>>  try (Stream<String> lines = Files.lines(etcMimeTypes)) {
>> 
>> Also you can use lines.forEach(System.out::println) if you want something shorter.
> 
> OK I will make those changes and re-post later.

I updated the patch per the foregoing suggestions:

http://cr.openjdk.java.net/~bpb/8150204/webrev.01/

A regression run across the usual platforms is in progress.

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20160219/19e88676/attachment-0001.html>


More information about the nio-dev mailing list