Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Alexander Kuppe2014-01-25 13:19:17 +0000
committerMarkus Alexander Kuppe2014-01-25 13:19:17 +0000
commit385a6a23b4096a622e8357866c737ab7596a0829 (patch)
tree0f8a04f952efbdf31e4a1d94c6b8f14671bf25a9 /providers
parentaf9eabaa9b77cbe9212db41c28f78b9b134f6500 (diff)
parentcf4ef0bacdd290b2f9e3be6660b696f8fb9fa46f (diff)
downloadorg.eclipse.ecf-385a6a23b4096a622e8357866c737ab7596a0829.tar.gz
org.eclipse.ecf-385a6a23b4096a622e8357866c737ab7596a0829.tar.xz
org.eclipse.ecf-385a6a23b4096a622e8357866c737ab7596a0829.zip
Merge branch 'master' into 426374
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java10
2 files changed, 9 insertions, 3 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF
index b620e00bf..674f8f6d3 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.provider.filetransfer;singleton:=true
-Bundle-Version: 3.2.0.qualifier
+Bundle-Version: 3.2.100.qualifier
Bundle-Activator: org.eclipse.ecf.internal.provider.filetransfer.Activator
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
index 3ecfd66f4..8ae247c2b 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
@@ -137,7 +137,7 @@ public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTrans
}
protected InputStream wrapTransferReadInputStream(InputStream inputStream, IProgressMonitor monitor) {
- return new PollingInputStream(remoteFileContents, getRetryAttempts(), monitor, readTimeoutMessage, closeTimeoutMessage);
+ return new PollingInputStream(inputStream, getRetryAttempts(), monitor, readTimeoutMessage, closeTimeoutMessage);
}
private int getRetryAttempts() {
@@ -165,8 +165,14 @@ public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTrans
double factor = (totalWork > Integer.MAX_VALUE) ? (((double) Integer.MAX_VALUE) / ((double) totalWork)) : 1.0;
int work = (totalWork > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) totalWork;
monitor.beginTask(getRemoteFileURL().toString() + Messages.AbstractRetrieveFileTransfer_Progress_Data, work);
- InputStream readInputStream = wrapTransferReadInputStream(remoteFileContents, monitor);
+ InputStream readInputStream = null;
try {
+ // We will test for remoteFileContents is null...if it is null then we can't continue.
+ // See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=425868
+ if (remoteFileContents == null)
+ throw new IOException("input stream cannot be null"); //$NON-NLS-1$
+ // Create read input stream
+ readInputStream = wrapTransferReadInputStream(remoteFileContents, monitor);
while (!isDone() && !isPaused()) {
try {
final int bytes = readInputStream.read(buf);

Back to the top