JDK 10 RFR of 8182710: File.listRoots() always returns the root of CD drive
christoph.langer at sap.com
Sat Jun 24 05:33:29 UTC 2017
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?
> -----Original Message-----
> From: core-libs-dev [mailto:core-libs-dev-bounces at openjdk.java.net] On
> Behalf Of Brian Burkhalter
> Sent: Freitag, 23. Juni 2017 23:56
> To: core-libs-dev <core-libs-dev at openjdk.java.net>
> Subject: JDK 10 RFR of 8182710: File.listRoots() always returns the root of CD
> Please review at your convenience.
> The listRoots() method invokes the GetLogicalDrives() Windows function 
> 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.
>  https://msdn.microsoft.com/en-
More information about the core-libs-dev