Hi Brian,

Looks ok,

I doubt its really useful to count the bits in the 'ds' mask since at most it can be 26 and
the array allocation is small and short lived.

Roger


On 6/24/17 1:33 AM, Langer, Christoph wrote:
Hi Brian,

looks good.

I have 2 small comments:
Line 591: new ArrayList<File> should probably just be new ArrayList<>
Line 592: char slash = this.slash; -> What's that for? Can't one just use the field 
"slash" directly?

Best regards
Christoph

-----Original Message-----
From: core-libs-dev [mailto:core-libs-dev-boun...@openjdk.java.net] On
Behalf Of Brian Burkhalter
Sent: Freitag, 23. Juni 2017 23:56
To: core-libs-dev <core-libs-dev@openjdk.java.net>
Subject: JDK 10 RFR of 8182710: File.listRoots() always returns the root of CD
drive

Please review at your convenience.

https://bugs.openjdk.java.net/browse/JDK-8182710
http://cr.openjdk.java.net/~bpb/8182710/webrev.00/

The listRoots() method invokes the GetLogicalDrives() Windows function [1]
which may set the bit for a CD's logical drive even if no CD is currently
inserted which also means that the root at which the CD file system would
exist were a CD inserted is included in the returned list even though that file
system location does not actually exist. This change eliminates including any
locations implied by a set bit in the return value of GetLogicalDrives() if that
location does not exist.

Thanks,

Brian

[1] https://msdn.microsoft.com/en-
us/library/windows/desktop/aa364972(v=vs.85).aspx

Reply via email to