1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-24 16:53:50 +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,10 +713,7 @@ 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
{ {
@ -724,6 +721,6 @@ public class SystemViewRemoteSearchResultAdapter extends AbstractSystemViewAdapt
} }
} }
} }
return ""; return ""; //$NON-NLS-1$
} }
} }

View file

@ -594,12 +594,9 @@ 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();
{ shellBuffer.append(pwd);
String pwd = pwdf.getAbsolutePath(); gotShell = true;
shellBuffer.append(pwd);
gotShell = true;
}
} }
else else
{ {