From 114706a7b4fb0789dbc73dc6f19ab1d3ab07e5bf Mon Sep 17 00:00:00 2001 From: "Christopher L. Shannon (cshannon)" Date: Tue, 25 Oct 2016 06:47:16 -0400 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-6478 Fixing compilation error with JDK 8 --- .../java/org/apache/activemq/ra/ServerSessionImplTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/activemq-ra/src/test/java/org/apache/activemq/ra/ServerSessionImplTest.java b/activemq-ra/src/test/java/org/apache/activemq/ra/ServerSessionImplTest.java index 322defc957..927a9b39fa 100644 --- a/activemq-ra/src/test/java/org/apache/activemq/ra/ServerSessionImplTest.java +++ b/activemq-ra/src/test/java/org/apache/activemq/ra/ServerSessionImplTest.java @@ -42,6 +42,7 @@ import org.apache.activemq.command.MessageDispatch; import org.apache.activemq.command.MessageId; import org.apache.activemq.util.Wait; import org.hamcrest.Description; +import org.hamcrest.Matchers; import org.jmock.Expectations; import org.jmock.Mockery; import org.jmock.api.Action; @@ -151,7 +152,7 @@ public class ServerSessionImplTest { allowing(messageEndpointFactory).createEndpoint(with(any(XAResource.class))); will(returnValue(messageEndpoint)); - allowing(workManager).scheduleWork((Work) with(anything()), with(any(long.class)), with(any(ExecutionContext.class)), + allowing(workManager).scheduleWork((Work) with(Matchers.instanceOf(Work.class)), with(any(long.class)), with(any(ExecutionContext.class)), with(any(WorkListener.class))); will(new Action() { @Override @@ -164,7 +165,7 @@ public class ServerSessionImplTest { } }); - allowing(messageEndpoint).beforeDelivery((Method) with(anything())); + allowing(messageEndpoint).beforeDelivery((Method) with(Matchers.instanceOf(Method.class))); allowing(messageEndpoint).onMessage(with(any(javax.jms.Message.class))); will(new Action() { @Override