mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-13 20:15:22 +02:00
Revert [cleanup] Get rid of deprecated RemoteFileSecurityException
This commit is contained in:
parent
a5b4879de3
commit
654cf929b5
2 changed files with 9 additions and 9 deletions
|
@ -131,7 +131,6 @@ 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;
|
||||||
|
@ -140,6 +139,7 @@ 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 SystemRemoteSecurityException, IOException
|
public void connect() throws RemoteFileSecurityException,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 SystemRemoteSecurityException(Activator.PLUGIN_ID, "connect", new Exception(lastMessage)); //$NON-NLS-1$
|
throw new RemoteFileSecurityException(new Exception(lastMessage));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(!FTPReply.isPositiveCompletion(userReply))
|
else if(!FTPReply.isPositiveCompletion(userReply))
|
||||||
{
|
{
|
||||||
String lastMessage = _ftpClient.getReplyString();
|
String lastMessage = _ftpClient.getReplyString();
|
||||||
disconnect();
|
disconnect();
|
||||||
throw new SystemRemoteSecurityException(Activator.PLUGIN_ID, "connect", new Exception(lastMessage)); //$NON-NLS-1$
|
throw new RemoteFileSecurityException(new Exception(lastMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
//System parser
|
//System parser
|
||||||
|
@ -1314,7 +1314,7 @@ public class FTPService extends AbstractFileService implements IFTPService, IFil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
throw new SystemRemoteSecurityException(Activator.PLUGIN_ID, "createFile", e); //$NON-NLS-1$
|
throw new RemoteFileSecurityException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
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 SystemRemoteSecurityException(Activator.PLUGIN_ID, "setReadOnly", new Exception(lastMessage)); //$NON-NLS-1$
|
throw new RemoteFileSecurityException(new Exception(lastMessage));
|
||||||
}
|
}
|
||||||
} 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 SystemRemoteSecurityException(Activator.PLUGIN_ID, "setFilePermissions", new Exception(lastMessage)); //$NON-NLS-1$
|
throw new RemoteFileSecurityException(new Exception(lastMessage));
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
String pluginId = Activator.getDefault().getBundle().getSymbolicName();
|
String pluginId = Activator.getDefault().getBundle().getSymbolicName();
|
||||||
|
|
|
@ -88,7 +88,6 @@ 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.SystemOperationCancelledException;
|
import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
|
||||||
import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
|
import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
|
||||||
import org.eclipse.rse.services.clientserver.messages.SystemRemoteSecurityException;
|
|
||||||
import org.eclipse.rse.services.clientserver.messages.SystemUnexpectedErrorException;
|
import org.eclipse.rse.services.clientserver.messages.SystemUnexpectedErrorException;
|
||||||
import org.eclipse.rse.services.files.AbstractFileService;
|
import org.eclipse.rse.services.files.AbstractFileService;
|
||||||
import org.eclipse.rse.services.files.HostFilePermissions;
|
import org.eclipse.rse.services.files.HostFilePermissions;
|
||||||
|
@ -99,6 +98,7 @@ 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.RemoteFileException;
|
import org.eclipse.rse.services.files.RemoteFileException;
|
||||||
import org.eclipse.rse.services.files.RemoteFileIOException;
|
import org.eclipse.rse.services.files.RemoteFileIOException;
|
||||||
|
import org.eclipse.rse.services.files.RemoteFileSecurityException;
|
||||||
public class SftpFileService extends AbstractFileService implements ISshService, IFilePermissionsService
|
public class SftpFileService extends AbstractFileService implements ISshService, IFilePermissionsService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -440,7 +440,7 @@ public class SftpFileService extends AbstractFileService implements ISshService,
|
||||||
SystemMessageException messageException;
|
SystemMessageException messageException;
|
||||||
SftpException sftpe = (SftpException)e;
|
SftpException sftpe = (SftpException)e;
|
||||||
if (sftpe.id == ChannelSftp.SSH_FX_PERMISSION_DENIED) {
|
if (sftpe.id == ChannelSftp.SSH_FX_PERMISSION_DENIED) {
|
||||||
messageException = new SystemRemoteSecurityException(Activator.PLUGIN_ID, e.getLocalizedMessage(), e);
|
messageException = new RemoteFileSecurityException(e);
|
||||||
} else if (sftpe.id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
|
} else if (sftpe.id == ChannelSftp.SSH_FX_NO_SUCH_FILE) {
|
||||||
//TODO better throw SENFE at the place where we know what element and operation is done
|
//TODO better throw SENFE at the place where we know what element and operation is done
|
||||||
messageException = new SystemElementNotFoundException("", ""); //$NON-NLS-1$ //$NON-NLS-2$
|
messageException = new SystemElementNotFoundException("", ""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
|
Loading…
Add table
Reference in a new issue