diff options
author | Mykola Nikishov | 2016-05-28 08:58:46 +0000 |
---|---|---|
committer | Thomas Watson | 2016-08-17 19:26:37 +0000 |
commit | 258e4b40ab8ac916b6832bb0d24200f870f64cf3 (patch) | |
tree | 95eba07380cc63058f732579b55402b82c7f0d9b | |
parent | a01e7659bf73d038eeec25c07986dbb60b1a4afb (diff) | |
download | rt.equinox.p2-258e4b40ab8ac916b6832bb0d24200f870f64cf3.tar.gz rt.equinox.p2-258e4b40ab8ac916b6832bb0d24200f870f64cf3.tar.xz rt.equinox.p2-258e4b40ab8ac916b6832bb0d24200f870f64cf3.zip |
Bug 494822 - Pass a range specification unconditionally
When sending request for transfer of a remote file to local file storage
from FileReader.sendRetrieveRequest(URI, OutputStream, DownloadRange,
boolean, IProgressMonitor), drop redundant null check for DownloadRange
parameter and pass it to IRetrieveFileTransferContainerAdapter's
sendRetrieveRequest(IFileID, IFileRangeSpecification,
IFileTransferListener, Map) as is because a range specification for
retrieving a portion of the given remote file is allowed to be null:
If null the entire file will be retrieved (as per
sendRetrieveRequest(IFileID, IFileTransferListener, Map).
Bug: 266243
Change-Id: If957ebd23e4a229db873cb6d4df3e10d5b93c75b
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java index 701e0330a..9a25565a8 100644 --- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java +++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2015 Cloudsmith Inc. + * Copyright (c) 2006, 2016 Cloudsmith Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -419,11 +419,7 @@ public final class FileReader extends FileTransferJob implements IFileTransferLi try { IFileID fileID = FileIDFactory.getDefault().createFileID(adapter.getRetrieveNamespace(), uri.toString()); - - if (range != null) - adapter.sendRetrieveRequest(fileID, range, this, options); - else - adapter.sendRetrieveRequest(fileID, this, options); + adapter.sendRetrieveRequest(fileID, range, this, options); } catch (IncomingFileTransferException e) { exception = e; } catch (FileCreateException e) { |