1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-25 09:13:48 +02:00

Remove unnecessary check after instanceof

This commit is contained in:
Martin Oberhuber 2006-08-08 08:34:20 +00:00
parent 25deb8be8d
commit 1f3cf11369
2 changed files with 5 additions and 11 deletions

View file

@ -713,17 +713,14 @@ public class SystemViewRemoteSearchResultAdapter extends AbstractSystemViewAdapt
if (context instanceof IRemoteFile) if (context instanceof IRemoteFile)
{ {
IRemoteFile cwd = (IRemoteFile)context; IRemoteFile cwd = (IRemoteFile)context;
if (cwd != null)
{
return cwd.getAbsolutePath(); return cwd.getAbsolutePath();
} }
}
else else
{ {
return context; return context;
} }
} }
} }
return ""; return ""; //$NON-NLS-1$
} }
} }

View file

@ -594,13 +594,10 @@ public abstract class RemoteCmdSubSystem extends SubSystem implements IRemoteCmd
if (context instanceof IRemoteFile) if (context instanceof IRemoteFile)
{ {
IRemoteFile pwdf = (IRemoteFile) context; IRemoteFile pwdf = (IRemoteFile) context;
if (pwdf != null)
{
String pwd = pwdf.getAbsolutePath(); String pwd = pwdf.getAbsolutePath();
shellBuffer.append(pwd); shellBuffer.append(pwd);
gotShell = true; gotShell = true;
} }
}
else else
{ {
shellBuffer.append(cmd.getType()); shellBuffer.append(cmd.getType());