1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-22 15:53:58 +02:00

[180711] Checked return value of Mutex.waitForLock()

This commit is contained in:
Javier Montalvo Orus 2007-04-04 14:29:57 +00:00
parent f3d3c8b2f7
commit 4b498e3e85

View file

@ -660,6 +660,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
*/ */
public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding) throws SystemMessageException public boolean download(IProgressMonitor monitor, String remoteParent, String remoteFile, File localFile, boolean isBinary, String hostEncoding) throws SystemMessageException
{ {
boolean retValue = false;
if (monitor!=null){ if (monitor!=null){
if (monitor.isCanceled()) { if (monitor.isCanceled()) {
@ -667,14 +668,12 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
} }
} }
_downloadMutex.waitForLock(monitor, Long.MAX_VALUE); if(_downloadMutex.waitForLock(monitor, Long.MAX_VALUE))
{
MyProgressMonitor progressMonitor = new MyProgressMonitor(monitor); MyProgressMonitor progressMonitor = new MyProgressMonitor(monitor);
IHostFile remoteHostFile = getFile(null,remoteParent,remoteFile); IHostFile remoteHostFile = getFile(null,remoteParent,remoteFile);
boolean retValue = false;
FTPClient ftpClient = getFTPClient(); FTPClient ftpClient = getFTPClient();
try try
@ -732,7 +731,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
} finally { } finally {
_downloadMutex.release(); _downloadMutex.release();
} }
}
return retValue; return retValue;
} }