Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8179320

File.getUsableSpace() returns a negative number on very large file system

XMLWordPrintable

    • b25
    • generic
    • generic

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      Some very large file systems such as Amazon Elastic File System (which reports a partition size of 8 EB or 1000 PB) can cause integer overflow when calling the method getUsableSpace() on a File object. It would be helpful to at least mention such limitations in the Javadoc despite it may be obvious judging by the method's return type (i.e. long). Alternatively, it would be useful to support returning a BigInteger type.


      REPRODUCIBILITY :
      This bug can be reproduced always.

            bpb Brian Burkhalter
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: