1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 23:05:47 +02:00

[cleanup] Get rid of deprecated RemoteFileSecurityException

This commit is contained in:
Martin Oberhuber 2009-08-06 22:08:53 +00:00
parent 056ebcef40
commit 1b9d7babf2

View file

@ -131,6 +131,7 @@ import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.clientserver.messages.SystemNetworkIOException; import org.eclipse.rse.services.clientserver.messages.SystemNetworkIOException;
import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException; import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
import org.eclipse.rse.services.clientserver.messages.SystemRemoteSecurityException;
import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException; import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException;
import org.eclipse.rse.services.files.AbstractFileService; import org.eclipse.rse.services.files.AbstractFileService;
import org.eclipse.rse.services.files.IFilePermissionsService; import org.eclipse.rse.services.files.IFilePermissionsService;
@ -139,7 +140,6 @@ import org.eclipse.rse.services.files.IHostFile;
import org.eclipse.rse.services.files.IHostFilePermissions; import org.eclipse.rse.services.files.IHostFilePermissions;
import org.eclipse.rse.services.files.IHostFilePermissionsContainer; import org.eclipse.rse.services.files.IHostFilePermissionsContainer;
import org.eclipse.rse.services.files.RemoteFileIOException; import org.eclipse.rse.services.files.RemoteFileIOException;
import org.eclipse.rse.services.files.RemoteFileSecurityException;
public class FTPService extends AbstractFileService implements IFTPService, IFilePermissionsService public class FTPService extends AbstractFileService implements IFTPService, IFilePermissionsService
{ {
@ -371,7 +371,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
return new RemoteFileIOException(e); return new RemoteFileIOException(e);
} }
public void connect() throws RemoteFileSecurityException,IOException public void connect() throws SystemRemoteSecurityException, IOException
{ {
if (_ftpClient == null) if (_ftpClient == null)
@ -429,14 +429,14 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
{ {
String lastMessage = _ftpClient.getReplyString(); String lastMessage = _ftpClient.getReplyString();
disconnect(); disconnect();
throw new RemoteFileSecurityException(new Exception(lastMessage)); throw new SystemRemoteSecurityException(Activator.PLUGIN_ID, "connect", new Exception(lastMessage)); //$NON-NLS-1$
} }
} }
else if(!FTPReply.isPositiveCompletion(userReply)) else if(!FTPReply.isPositiveCompletion(userReply))
{ {
String lastMessage = _ftpClient.getReplyString(); String lastMessage = _ftpClient.getReplyString();
disconnect(); disconnect();
throw new RemoteFileSecurityException(new Exception(lastMessage)); throw new SystemRemoteSecurityException(Activator.PLUGIN_ID, "connect", new Exception(lastMessage)); //$NON-NLS-1$
} }
//System parser //System parser
@ -1314,7 +1314,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
} }
} }
catch (Exception e) { catch (Exception e) {
throw new RemoteFileSecurityException(e); throw new SystemRemoteSecurityException(Activator.PLUGIN_ID, "createFile", e); //$NON-NLS-1$
} }
return getFile(remoteParent, fileName, monitor); return getFile(remoteParent, fileName, monitor);
@ -1638,7 +1638,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
clearCache(parent); clearCache(parent);
if (!_ftpClient.sendSiteCommand("CHMOD " + newPermissions + " " + file.getAbsolutePath())) { //$NON-NLS-1$ //$NON-NLS-2$ if (!_ftpClient.sendSiteCommand("CHMOD " + newPermissions + " " + file.getAbsolutePath())) { //$NON-NLS-1$ //$NON-NLS-2$
String lastMessage = _ftpClient.getReplyString(); String lastMessage = _ftpClient.getReplyString();
throw new RemoteFileSecurityException(new Exception(lastMessage)); throw new SystemRemoteSecurityException(Activator.PLUGIN_ID, "setReadOnly", new Exception(lastMessage)); //$NON-NLS-1$
} }
} catch (IOException e) { } catch (IOException e) {
String pluginId = Activator.getDefault().getBundle().getSymbolicName(); String pluginId = Activator.getDefault().getBundle().getSymbolicName();
@ -1784,7 +1784,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
clearCache(inFile.getParentPath()); clearCache(inFile.getParentPath());
if (!_ftpClient.sendSiteCommand("CHMOD " + s + " " + inFile.getAbsolutePath())) { //$NON-NLS-1$ //$NON-NLS-2$ if (!_ftpClient.sendSiteCommand("CHMOD " + s + " " + inFile.getAbsolutePath())) { //$NON-NLS-1$ //$NON-NLS-2$
String lastMessage = _ftpClient.getReplyString(); String lastMessage = _ftpClient.getReplyString();
throw new RemoteFileSecurityException(new Exception(lastMessage)); throw new SystemRemoteSecurityException(Activator.PLUGIN_ID, "setFilePermissions", new Exception(lastMessage)); //$NON-NLS-1$
} }
} catch (IOException e) { } catch (IOException e) {
String pluginId = Activator.getDefault().getBundle().getSymbolicName(); String pluginId = Activator.getDefault().getBundle().getSymbolicName();