Skip to content

Commit a7b2add

Browse files
author
Pascal Dal Farra
committed
fix: Fix TransitionComparator
1 parent 5f1a4f4 commit a7b2add

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-statemachine-uml/src/main/java/org/springframework/statemachine/plantuml/ContextTransition.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ public class ContextTransition<S, E> {
1515
public static <S, E> ContextTransition<S, E> of(@Nullable StateContext<S, E> stateContext) {
1616
if (stateContext != null) {
1717
return new ContextTransition<>(
18-
stateContext.getSource().getId(),
18+
stateContext.getSource() != null
19+
? stateContext.getSource().getId()
20+
: null,
1921
stateContext.getEvent(),
2022
stateContext.getTarget() != null
2123
? stateContext.getTarget().getId()

0 commit comments

Comments
 (0)