[jbosstools-issues] [JBoss JIRA] (JBIDE-12398) Bug in PollThread, mixing up expected nad actual when alerting listeners

Rob Stryker (JIRA) jira-events at lists.jboss.org
Thu Aug 2 07:59:07 EDT 2012


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

Rob Stryker resolved JBIDE-12398.
---------------------------------

    Resolution: Done


patch committed to trunk
                
> Bug in PollThread, mixing up expected nad actual when alerting listeners
> ------------------------------------------------------------------------
>
>                 Key: JBIDE-12398
>                 URL: https://issues.jboss.org/browse/JBIDE-12398
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: JBossAS/Servers
>    Affects Versions: 3.4.0.M1
>            Reporter: Rob Stryker
>            Assignee: Rob Stryker
>             Fix For: 3.4.0.M1
>
>
> There is currently only one implementer of the interface which is being misued, and that specific instance is not affected by the bug. This is a bug only discoverable via unit test. There is no behaviour change at all for it. 
> The interface IPollResultListener has two methods:
> 	public void stateAsserted(boolean expectedState, boolean currentState);
> 	public void stateNotAsserted(boolean expectedState, boolean currentState);	
> The PollThread class is misusing these methods, and instead calling with the parameters reversed. In the case of stateAsserted(bool, bool), this is not able to be noticed. In this case, it is saying the transition worked, so both values will be the same no matter what. Either expected is up or down, and, necessarily, the actual value will be the same as expected.
> In the case of stateNotAsserted, however, the ordering definitely matters. Either the server is up when it should be down, or it is down when it should be up. This difference matters. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list