RFR: 7057369: (fs spec) FileStore getUsableSpace and getUnallocatedSpace could be clearer
Alan Bateman
alanb at openjdk.org
Fri Jan 5 14:11:24 UTC 2024
On Thu, 4 Jan 2024 21:15:18 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Attempt to clarify when the values returned for a `FileStore`s usable and unallocated space are initialized and likely to be valid.
src/java.base/share/classes/java/nio/file/FileStore.java line 102:
> 100: * virtual machine as of invoking this method. If the number of bytes
> 101: * available is greater than {@link Long#MAX_VALUE}, then
> 102: * {@code Long.MAX_VALUE} will be returned.
I think the original paragraph is okay. The change to the second paragraph looks good.
src/java.base/share/classes/java/nio/file/FileStore.java line 111:
> 109: * of this Java virtual machine.
> 110: *
> 111: * @return the number of bytes available at the time of invocation
It might be simpler to just say "the current number of usable bytes".
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17271#discussion_r1442930275
PR Review Comment: https://git.openjdk.org/jdk/pull/17271#discussion_r1442929597
More information about the nio-dev
mailing list