fix: 修复通过EntityPrepareModifyEvent重新设置可能无效问题 (#288)

* fix: 修复通过EntityPrepareModifyEvent重新设置可能无效问题

* fix: 修复无法设置null问题
This commit is contained in:
老周
2024-05-15 11:34:25 +08:00
committed by GitHub
parent 439f19034f
commit df0dce11a2
4 changed files with 83 additions and 22 deletions

View File

@@ -25,12 +25,14 @@ public class DefaultAsyncEvent implements AsyncEvent {
}
@Override
public void transformFirst(Function<Mono<?>, Publisher<?>> mapper) {
public synchronized void transformFirst(Function<Mono<?>, Publisher<?>> mapper) {
hasListener = true;
this.first = Mono.fromDirect(mapper.apply(this.first));
}
@Override
public void transform(Function<Mono<?>, Publisher<?>> mapper) {
public synchronized void transform(Function<Mono<?>, Publisher<?>> mapper) {
hasListener = true;
this.async = Mono.fromDirect(mapper.apply(this.async));
}