Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bonita
bonita-studio
Commits
4a63abc1
Commit
4a63abc1
authored
Nov 05, 2014
by
Romain Bioteau
Browse files
Fix StackOverflow expetion in Token dispatcher
parent
cbab41f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
bundles/plugins/org.bonitasoft.studio.validation/src/org/bonitasoft/studio/validation/TokenDispatcher.java
View file @
4a63abc1
...
...
@@ -278,6 +278,7 @@ public class TokenDispatcher {
private
void
visit
(
final
SourceElement
sourceElement
)
{
BonitaStudioLog
.
debug
(
"Token dispatcher visiting "
+
sourceElement
.
getName
(),
ValidationPlugin
.
PLUGIN_ID
);
boolean
allOutgoingFlowsHaveToken
=
true
;
for
(
final
Connection
c
:
sourceElement
.
getOutgoing
()){
if
(
c
instanceof
SequenceFlow
&&
(((
SequenceFlow
)
c
).
getPathToken
()
==
null
||
((
SequenceFlow
)
c
).
getPathToken
().
isEmpty
())){
...
...
@@ -291,16 +292,18 @@ public class TokenDispatcher {
for
(
final
Connection
c
:
sourceElement
.
getOutgoing
()){
if
(
c
instanceof
SequenceFlow
){
final
EObject
target
=
c
.
getTarget
();
if
(
target
instanceof
ThrowLinkEvent
){
visit
(((
ThrowLinkEvent
)
target
).
getTo
());
}
else
{
if
(
target
instanceof
Activity
){
for
(
final
BoundaryEvent
event
:
((
Activity
)
target
).
getBoundaryIntermediateEvents
()){
visit
(
event
);
if
(!
sourceElement
.
equals
(
target
))
{
if
(
target
instanceof
ThrowLinkEvent
)
{
visit
(((
ThrowLinkEvent
)
target
).
getTo
());
}
else
{
if
(
target
instanceof
Activity
)
{
for
(
final
BoundaryEvent
event
:
((
Activity
)
target
).
getBoundaryIntermediateEvents
())
{
visit
(
event
);
}
}
if
(
target
instanceof
FlowElement
)
{
visit
((
SourceElement
)
target
);
}
}
if
(
target
instanceof
FlowElement
){
visit
((
SourceElement
)
target
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment