From 6666e89126f3e0d1c0630fec8f991e85103ac167 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Fri, 25 Aug 2006 14:03:59 +0000 Subject: [PATCH] [cleanup] Fix compiler warnings --- .../ui/view/CommandEntryContentAssistProcessor.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java index 210303866db..e80e9624a26 100644 --- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java +++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/CommandEntryContentAssistProcessor.java @@ -139,7 +139,7 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess if (_remoteCommand != null) { RemoteCmdSubSystem cmdSubsystem = (RemoteCmdSubSystem) _remoteCommand.getCommandSubSystem(); - String type = cmdSubsystem.getHost().getSystemType(); + //String type = cmdSubsystem.getHost().getSystemType(); if (cmdSubsystem.isWindows()) { _isWindows = true; @@ -432,10 +432,9 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess private void getEnvironmentCompletions(String currentText, CompletionResults results) { - IRemoteCmdSubSystem subsystem = _remoteCommand.getCommandSubSystem(); - if (subsystem instanceof IRemoteCmdSubSystem) + IRemoteCmdSubSystem cmdSubsystem = _remoteCommand.getCommandSubSystem(); + if (cmdSubsystem != null) { - IRemoteCmdSubSystem cmdSubsystem = (IRemoteCmdSubSystem) subsystem; List vars = cmdSubsystem.getHostEnvironmentVariables(); if (vars != null) { @@ -469,10 +468,9 @@ public class CommandEntryContentAssistProcessor implements IContentAssistProcess private void getCommandCompletions(String currentText, CompletionResults results) { - IRemoteCmdSubSystem subsystem = _remoteCommand.getCommandSubSystem(); - if (subsystem instanceof IRemoteCmdSubSystem) + IRemoteCmdSubSystem cmdSubsystem = _remoteCommand.getCommandSubSystem(); + if (cmdSubsystem != null) { - IRemoteCmdSubSystem cmdSubsystem = (IRemoteCmdSubSystem) subsystem; ICandidateCommand[] cmds = cmdSubsystem.getCandidateCommands(_remoteCommand); if (cmds != null) {