diff --git a/exist-core/src/main/java/org/exist/collections/triggers/TriggerStatePerThread.java b/exist-core/src/main/java/org/exist/collections/triggers/TriggerStatePerThread.java index af6927019bc..0faad32731d 100644 --- a/exist-core/src/main/java/org/exist/collections/triggers/TriggerStatePerThread.java +++ b/exist-core/src/main/java/org/exist/collections/triggers/TriggerStatePerThread.java @@ -152,7 +152,7 @@ private static Deque getStates() { return THREAD_LOCAL_STATES.computeIfAbsent(Thread.currentThread(), thread -> new ArrayDeque<>()); } - private record TriggerState(Trigger trigger, TriggerPhase triggerPhase, TriggerEvent triggerEvent, XmldbURI src, + record TriggerState(Trigger trigger, TriggerPhase triggerPhase, TriggerEvent triggerEvent, XmldbURI src, @Nullable XmldbURI dst, boolean possiblyCyclic) { @Override @@ -186,7 +186,7 @@ public String toString() { } - private boolean equalsIgnoringPhase(final Trigger otherTrigger, final TriggerEvent otherTriggerEvent, final XmldbURI otherSrc, @Nullable final XmldbURI otherDst) { + boolean equalsIgnoringPhase(final Trigger otherTrigger, final TriggerEvent otherTriggerEvent, final XmldbURI otherSrc, @Nullable final XmldbURI otherDst) { if (!trigger.equals(otherTrigger)) { return false; } @@ -222,29 +222,5 @@ public boolean isCompletedBy(final Trigger otherTrigger, final TriggerPhase othe return Objects.equals(dst, otherDst); } - - public boolean completes(final Object o) { - if (o instanceof TriggerState that) { - if (this.triggerPhase != TriggerPhase.AFTER - || that.triggerPhase != TriggerPhase.BEFORE) { - return false; - } - - if (!trigger.equals(that.trigger)) { - return false; - } - - if (triggerEvent != that.triggerEvent) { - return false; - } - - if (!src.equals(that.src)) { - return false; - } - - return Objects.equals(dst, that.dst); - } - return false; - } } }