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

java.io.File attribute accessors broken on large files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.0
    • 1.2.2
    • core-libs
    • None
    • kestrel
    • generic
    • solaris_2.6

      File.exists() does not work on files > 2GB. It doesn't work on JDK1.2.1_03
      and up. It works on JDK1.1.6.

      Instructions to reproduce:

      1) mkfile 2050m twogig
      2) Compile and run java program below:

      import java.io.*;

      public class FileExists {

              public static void main(String argv[]) {

                      File fl = new File("/export/file_exists/twogig");
                      
                      if (fl.exists())
                              System.out.println("Exists length - " + fl.length());
                      else
                              System.out.println("Doesn't exist");
              }
      }

            mmcclosksunw Michael Mccloskey (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: