6245663: (spec) File.renameTo(File) changes the file-system object, not the File instance
Reviewed-by: rriggs, naoto, alanb
This commit is contained in:
parent
c4f17a3e1d
commit
851b2e31e1
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1994, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1376,7 +1376,9 @@ public class File
|
||||
* file from one filesystem to another, it might not be atomic, and it
|
||||
* might not succeed if a file with the destination abstract pathname
|
||||
* already exists. The return value should always be checked to make sure
|
||||
* that the rename operation was successful.
|
||||
* that the rename operation was successful. As instances of {@code File}
|
||||
* are immutable, this File object is not changed to name the destination
|
||||
* file or directory.
|
||||
*
|
||||
* <p> Note that the {@link java.nio.file.Files} class defines the {@link
|
||||
* java.nio.file.Files#move move} method to move or rename a file in a
|
||||
|
Loading…
x
Reference in New Issue
Block a user