From 1cac1b7a41122c522646cf785c319ca7c647eeff Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Sun, 15 Jul 2018 09:53:38 -0400 Subject: [PATCH] [JENKINS-52417] Javadoc clarifications now that INFRA-1600 is cleared up. --- core/src/main/java/hudson/FilePath.java | 7 ++++--- core/src/main/java/jenkins/util/VirtualFile.java | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index 80dec77b0d..00d453f794 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -963,9 +963,10 @@ public final class FilePath implements Serializable { } /** - * Reads the URL on the current VM, and writes all the data to this {@link FilePath} - * (this is different from resolving URL remotely.) - * + * Reads the URL on the current VM, and streams the data to this file using the Remoting channel. + *

This is different from resolving URL remotely. + * If you instead wished to open an HTTP(S) URL on the remote side, + * prefer {@code RobustHTTPClient.copyFromRemotely}. * @since 1.293 */ public void copyFrom(URL url) throws IOException, InterruptedException { diff --git a/core/src/main/java/jenkins/util/VirtualFile.java b/core/src/main/java/jenkins/util/VirtualFile.java index b8491df130..3db7461a93 100644 --- a/core/src/main/java/jenkins/util/VirtualFile.java +++ b/core/src/main/java/jenkins/util/VirtualFile.java @@ -337,8 +337,7 @@ public abstract class VirtualFile implements Comparable, Serializab * Optionally obtains a URL which may be used to retrieve file contents from any process on any node. * For example, given cloud storage this might produce a permalink to the file. *

Only {@code http} and {@code https} protocols are permitted. - * It is recommended to use the {@code RobustHTTPClient.downloadFile} utility method - * from the {@code apache-httpcomponents-client-4-api} plugin to work with these URLs. + * It is recommended to use {@code RobustHTTPClient.downloadFile} to work with these URLs. *

This is only meaningful for {@link #isFile}: * no ZIP etc. archiving protocol is defined to allow bulk access to directory trees. *

Any necessary authentication must be encoded somehow into the URL itself;