diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IAnonymousInterceptor.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IAnonymousInterceptor.java index df940ac34dd..593f1a3e202 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IAnonymousInterceptor.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/interceptor/api/IAnonymousInterceptor.java @@ -31,6 +31,6 @@ import com.google.common.annotations.VisibleForTesting; @VisibleForTesting public interface IAnonymousInterceptor { - void invoke(Pointcut thePointcut, HookParams theArgs); + void invoke(IPointcut thePointcut, HookParams theArgs); } diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2513-pointcutlatch-should-work-with-ipointcut.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2513-pointcutlatch-should-work-with-ipointcut.yaml new file mode 100644 index 00000000000..6528b29d946 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_4_0/2513-pointcutlatch-should-work-with-ipointcut.yaml @@ -0,0 +1,4 @@ +--- +type: change +issue: 2513 +title: "PointCutLatch now works with IPointcut instead of Pointcut." diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java index 8328a62cbcf..458d4bfbd5f 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/test/concurrency/PointcutLatch.java @@ -23,7 +23,7 @@ package ca.uhn.test.concurrency; import ca.uhn.fhir.interceptor.api.HookParams; import ca.uhn.fhir.interceptor.api.IAnonymousInterceptor; -import ca.uhn.fhir.interceptor.api.Pointcut; +import ca.uhn.fhir.interceptor.api.IPointcut; import com.google.common.collect.ListMultimap; import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -52,11 +52,12 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch { private final AtomicReference myCountdownLatchSetStacktrace = new AtomicReference<>(); private final AtomicReference> myFailures = new AtomicReference<>(); private final AtomicReference> myCalledWith = new AtomicReference<>(); - private final Pointcut myPointcut; + private final IPointcut myPointcut; private int myDefaultTimeoutSeconds = DEFAULT_TIMEOUT_SECONDS; private int myInitialCount; private boolean myExactMatch; - public PointcutLatch(Pointcut thePointcut) { + + public PointcutLatch(IPointcut thePointcut) { this.myName = thePointcut.name(); myPointcut = thePointcut; } @@ -189,7 +190,7 @@ public class PointcutLatch implements IAnonymousInterceptor, IPointcutLatch { @Override - public void invoke(Pointcut thePointcut, HookParams theArgs) { + public void invoke(IPointcut thePointcut, HookParams theArgs) { myLastInvoke.set(System.currentTimeMillis()); CountDownLatch latch = myCountdownLatch.get();