[jbosstools-issues] [JBoss JIRA] Created: (JBIDE-9520) LocalJBossBehaviorDelegate#canChangeState should not swallow Exception
Andre Dietisheim (JIRA)
jira-events at lists.jboss.org
Thu Aug 11 06:18:32 EDT 2011
LocalJBossBehaviorDelegate#canChangeState should not swallow Exception
----------------------------------------------------------------------
Key: JBIDE-9520
URL: https://issues.jboss.org/browse/JBIDE-9520
Project: Tools (JBoss Tools)
Issue Type: Enhancement
Reporter: Andre Dietisheim
LocalJBossBehaviorDelegate#canChangeState swallows an Exception can would occur when getting the jboss runtime for a given server:
{code}
public IStatus canChangeState(String launchMode) {
try {
if( getServer() != null
&& getServer().getRuntime() != null
&& RuntimeUtils.checkedGetJBossServerRuntime(getServer()).getVM() != null )
return Status.OK_STATUS;
} catch(Exception e) {
// ignore
}
return new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
MessageFormat.format(Messages.ServerHasNoRuntime, getServer().getName()));
}
{code}
RuntimeUtils#checkedGetJBossServerRuntime throws a CoreException if fetching failed. We should not swallow this exception but return it instead of a general purpose error status.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list