Skip to content
Permalink
Browse files
6245663: (spec) File.renameTo(File) changes the file-system object, n…
…ot the File instance

Reviewed-by: rriggs, naoto, alanb
  • Loading branch information
Brian Burkhalter committed Feb 19, 2021
1 parent c4f17a3 commit 851b2e31e182dd69071dd3e96987590447237541
Showing 1 changed file with 4 additions and 2 deletions.
@@ -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 boolean mkdirs() {
* 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

1 comment on commit 851b2e3

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 851b2e3 Feb 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.