[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-9520) LocalJBossBehaviorDelegate#canChangeState should not swallow Exception

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Thu Aug 11 06:20:37 EDT 2011


     [ https://issues.jboss.org/browse/JBIDE-9520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andre Dietisheim updated JBIDE-9520:
------------------------------------

             Assignee: Andre Dietisheim
        Fix Version/s: 3.3.0.M3
    Affects Version/s: 3.3.0.M3
          Component/s: JBossAS


> LocalJBossBehaviorDelegate#canChangeState should not swallow Exception
> ----------------------------------------------------------------------
>
>                 Key: JBIDE-9520
>                 URL: https://issues.jboss.org/browse/JBIDE-9520
>             Project: Tools (JBoss Tools)
>          Issue Type: Enhancement
>          Components: JBossAS
>    Affects Versions: 3.3.0.M3
>            Reporter: Andre Dietisheim
>            Assignee: Andre Dietisheim
>             Fix For: 3.3.0.M3
>
>
> 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