GP-3358: Fix for DO_OBJECT_RESTORED post GP-3084

This commit is contained in:
Dan 2023-04-27 14:29:00 -04:00
parent 269ea1ae7a
commit 97ef45a2bb

View file

@ -168,8 +168,12 @@ public class TypedEventDispatcher {
public void handleChangeRecord(DomainObjectChangeRecord rec) {
//String typeName = DefaultTraceChangeType.getName(rec.getEventType());
//CountsByType.compute(typeName, (k, v) -> v == null ? 1 : v + 1);
if (rec instanceof TraceChangeRecord) {
handleTraceChangeRecord((TraceChangeRecord<?, ?>) rec);
if (rec.getEventType() == DomainObject.DO_OBJECT_RESTORED && restoredHandler != null) {
restoredHandler.accept(rec);
return;
}
if (rec instanceof TraceChangeRecord<?, ?> cr) {
handleTraceChangeRecord(cr);
return;
}
Consumer<DomainObjectChangeRecord> handler;