NoOpStub messages is typed
This commit is contained in:
@@ -35,7 +35,7 @@ public class BatchStubRunnerFactory {
|
||||
private final MessageVerifierSender<?> contractVerifierMessaging;
|
||||
|
||||
public BatchStubRunnerFactory(StubRunnerOptions stubRunnerOptions) {
|
||||
this(stubRunnerOptions, new NoOpStubMessages());
|
||||
this(stubRunnerOptions, new NoOpStubMessages<>());
|
||||
}
|
||||
|
||||
public BatchStubRunnerFactory(StubRunnerOptions stubRunnerOptions, MessageVerifierSender<?> verifier) {
|
||||
@@ -43,7 +43,7 @@ public class BatchStubRunnerFactory {
|
||||
}
|
||||
|
||||
public BatchStubRunnerFactory(StubRunnerOptions stubRunnerOptions, StubDownloader stubDownloader) {
|
||||
this(stubRunnerOptions, stubDownloader, new NoOpStubMessages());
|
||||
this(stubRunnerOptions, stubDownloader, new NoOpStubMessages<>());
|
||||
}
|
||||
|
||||
public BatchStubRunnerFactory(StubRunnerOptions stubRunnerOptions, StubDownloader stubDownloader,
|
||||
|
||||
@@ -56,7 +56,7 @@ public class StubRunner implements StubRunning {
|
||||
|
||||
public StubRunner(StubRunnerOptions stubRunnerOptions, String repositoryPath,
|
||||
StubConfiguration stubsConfiguration) {
|
||||
this(stubRunnerOptions, repositoryPath, stubsConfiguration, new NoOpStubMessages());
|
||||
this(stubRunnerOptions, repositoryPath, stubsConfiguration, new NoOpStubMessages<>());
|
||||
}
|
||||
|
||||
public StubRunner(StubRunnerOptions stubRunnerOptions, String repositoryPath, StubConfiguration stubsConfiguration,
|
||||
|
||||
@@ -39,13 +39,13 @@ public class NoOpContractVerifierAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(MessageVerifier.class)
|
||||
public NoOpStubMessages contractVerifierMessageExchange() {
|
||||
return new NoOpStubMessages();
|
||||
public NoOpStubMessages<Object> contractVerifierMessageExchange() {
|
||||
return new NoOpStubMessages<>();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(ContractVerifierMessaging.class)
|
||||
public ContractVerifierMessaging<Object> contractVerifierMessaging(NoOpStubMessages messages) {
|
||||
public ContractVerifierMessaging<Object> contractVerifierMessaging(NoOpStubMessages<Object> messages) {
|
||||
return new ContractVerifierMessaging<>(messages, messages);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,10 +25,10 @@ import org.springframework.cloud.contract.verifier.messaging.MessageVerifier;
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
public class NoOpStubMessages implements MessageVerifier<Object> {
|
||||
public class NoOpStubMessages<U> implements MessageVerifier<U> {
|
||||
|
||||
@Override
|
||||
public void send(Object message, String destination, YamlContract contract) {
|
||||
public void send(U message, String destination, YamlContract contract) {
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -36,12 +36,12 @@ public class NoOpStubMessages implements MessageVerifier<Object> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object receive(String destination, long timeout, TimeUnit timeUnit, YamlContract contract) {
|
||||
public U receive(String destination, long timeout, TimeUnit timeUnit, YamlContract contract) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object receive(String destination, YamlContract contract) {
|
||||
public U receive(String destination, YamlContract contract) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user