Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2014-01-24 22:11:34 +0000
committerslewis2014-01-24 22:11:34 +0000
commit8f6cb46a980adeecc6e68e1fe8d772a4ebbdb860 (patch)
tree719c3c7d3bfd87c984808a833d8d2b202597f452 /providers
parent44b7a5ba09f181b83a071a0e7ddbe5ff89b7436d (diff)
downloadorg.eclipse.ecf-8f6cb46a980adeecc6e68e1fe8d772a4ebbdb860.tar.gz
org.eclipse.ecf-8f6cb46a980adeecc6e68e1fe8d772a4ebbdb860.tar.xz
org.eclipse.ecf-8f6cb46a980adeecc6e68e1fe8d772a4ebbdb860.zip
Fix for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=425868
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