From 37ec66323b4fd0b8b7620ceee19d8cb4ebcf1084 Mon Sep 17 00:00:00 2001 From: Patrick Reinhart Date: Tue, 30 Apr 2024 21:38:33 +0200 Subject: [PATCH] Remove unused method --- .../triggers/TriggerStatePerThread.java | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) 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; - } } }