spring-projects / spring-statemachine

Spring Statemachine is a framework for application developers to use state machine concepts with Spring.
1.52k stars 598 forks source link

Override Java 1.8 default Map methods in ObservableMap #1075

Open rand0m86 opened 1 year ago

rand0m86 commented 1 year ago

This is to ensure that default map methods will be passed to the delegate, which is in this case an instance of ConcurrentHashMap.

Without this change, an attempt to modify state variables via default methods will be delegated to default Map implementation, which is not thread safe. These methods are already overridden in ConcurrentHashMap.

rand0m86 commented 1 year ago

@jvalkeal please review.