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

(spec) File.renameTo(File) changes the file-system object, not the File instance

XMLWordPrintable

    • b11

      A DESCRIPTION OF THE PROBLEM :
      File.renameto(File) should specify that in case of success, the File object does *not* get modified to point to the name filename. This isn't obvious from the current documentation.

      Issue #4094022 and http://www.jroller.com/page/ethdsy/20040920 make it clear that this is catching people off guard.


      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#renameTo(java.io.File)
      ###@###.### 2005-03-24 19:06:21 GMT

            bpb Brian Burkhalter
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: