[
https://issues.apache.org/jira/browse/SCXML-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13816801#comment-13816801
]
Woonsan Ko commented on SCXML-160:
----------------------------------
This is an easy one.
In the current code below, we can simply remove the line casting tt to State
and just use tt variable instead in the comparisons below:
for (TransitionTarget tt : lca.getChildren()) {
State s = (State) tt;
if (s == parent1) {
return 1;
} else if (s == parent2) {
return -1;
}
}
Will fix it soon.
> Cast to State in TransitionTargetComparator
> -------------------------------------------
>
> Key: SCXML-160
> URL: https://issues.apache.org/jira/browse/SCXML-160
> Project: Commons SCXML
> Issue Type: Bug
> Affects Versions: 0.9
> Reporter: Eugen Kogan
> Priority: Minor
> Fix For: 2.0
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> The line 90 of the
> /commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/TransitionTargetComparator
> (compare(...) method)
> looks like this:
>
> State s = (State) iter.next();
>
> The cast to State causes a cast exception in case if the state machine has
> nested parallels (without intermediate states). The line should be replaced
> with
> TransitionTarget s = (TransitionTarget) iter.next();
--
This message was sent by Atlassian JIRA
(v6.1#6144)