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
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
- csr for
-
JDK-8261935 (spec) File.renameTo(File) changes the file-system object, not the File instance
-
- Closed
-
- duplicates
-
JDK-6246551 (spec) File.renameTo and File class javadoc - misleading immutability statement
-
- Closed
-