File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
flapi-runtime/src/main/java/unquietcode/tools/flapi/runtime
src/main/java/unquietcode/tools/flapi/graph/processors Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 32
32
@ Target (ElementType .METHOD )
33
33
public @interface MethodInfo {
34
34
TransitionType type ();
35
- Class <?>[] chain ();
35
+ Class <?>[] chain () default {} ;
36
36
Class <?> next () default MethodInfo .class ;
37
37
}
Original file line number Diff line number Diff line change @@ -81,11 +81,13 @@ public void visit(LateralTransition transition) {
81
81
});
82
82
83
83
// store the type information for the state chain
84
- JAnnotationArrayMember chain = infoAnnotation .paramArray ("chain" );
84
+ if (!transition .getStateChain ().isEmpty ()) {
85
+ JAnnotationArrayMember chain = infoAnnotation .paramArray ("chain" );
85
86
86
- for (StateClass sc : transition .getStateChain ()) {
87
- JDefinedClass type = BUILDER_INTERFACE_STRATEGY .createType (ctx , sc );
88
- chain .param (type );
87
+ for (StateClass sc : transition .getStateChain ()) {
88
+ JDefinedClass type = BUILDER_INTERFACE_STRATEGY .createType (ctx , sc );
89
+ chain .param (type );
90
+ }
89
91
}
90
92
91
93
// if it's an atLeast method, requiring tracking
You can’t perform that action at this time.
0 commit comments