mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 12:02:20 +00:00
Deprecate Util.copyFile() (#6272)
* deprecate copyFile * Update core/src/main/java/hudson/Util.java Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
This commit is contained in:
1 parent
6071d5ab40
commit
eecfbf2a33
1 file changed
+6
@@ -57,6 +57,7 @@ import java.nio.charset.CharacterCodingException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.CharsetEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.CopyOption;
|
||||
import java.nio.file.FileAlreadyExistsException;
|
||||
import java.nio.file.FileSystemException;
|
||||
import java.nio.file.FileSystems;
|
||||
@@ -1071,7 +1072,12 @@ public class Util {
|
||||
|
||||
/**
|
||||
* Copies a single file by using Ant.
|
||||
*
|
||||
* @deprecated since TODO; use {@link Files#copy(Path, Path, CopyOption...)} directly
|
||||
*/
|
||||
@Deprecated
|
||||
@Restricted(NoExternalUse.class)
|
||||
@RestrictedSince("TODO")
|
||||
public static void copyFile(@NonNull File src, @NonNull File dst) throws BuildException {
|
||||
Copy cp = new Copy();
|
||||
cp.setProject(new Project());
|
||||
|
||||
Reference in new issue
Block a user