Polish SerializationTestUtils, clean up warnings, etc.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -325,6 +325,7 @@ public class StubTextMessage implements TextMessage {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("rawtypes")
|
||||
public boolean isBodyAssignableTo(Class c) throws JMSException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -87,9 +87,8 @@ public class JmsNamespaceHandlerTests {
|
||||
containers = context.getBeansOfType(GenericMessageEndpointManager.class);
|
||||
assertThat(containers.size()).as("Context should contain 3 JCA endpoint containers").isEqualTo(3);
|
||||
|
||||
Map<String, JmsListenerContainerFactory> containerFactories =
|
||||
context.getBeansOfType(JmsListenerContainerFactory.class);
|
||||
assertThat(containerFactories.size()).as("Context should contain 3 JmsListenerContainerFactory instances").isEqualTo(3);
|
||||
assertThat(context.getBeansOfType(JmsListenerContainerFactory.class))
|
||||
.as("Context should contain 3 JmsListenerContainerFactory instances").hasSize(3);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -121,6 +121,7 @@ public class SimpleMessageListenerContainerTests {
|
||||
GenericApplicationContext context = new GenericApplicationContext();
|
||||
context.getBeanFactory().registerSingleton("messageListenerContainer", this.container);
|
||||
context.refresh();
|
||||
context.close();
|
||||
|
||||
verify(connection).setExceptionListener(this.container);
|
||||
}
|
||||
@@ -151,6 +152,7 @@ public class SimpleMessageListenerContainerTests {
|
||||
GenericApplicationContext context = new GenericApplicationContext();
|
||||
context.getBeanFactory().registerSingleton("messageListenerContainer", this.container);
|
||||
context.refresh();
|
||||
context.close();
|
||||
|
||||
verify(connection).setExceptionListener(this.container);
|
||||
verify(connection).start();
|
||||
|
||||
@@ -341,7 +341,7 @@ public class MessagingMessageListenerAdapterTests {
|
||||
}
|
||||
|
||||
|
||||
protected MessagingMessageListenerAdapter getSimpleInstance(String methodName, Class... parameterTypes) {
|
||||
protected MessagingMessageListenerAdapter getSimpleInstance(String methodName, Class<?>... parameterTypes) {
|
||||
Method m = ReflectionUtils.findMethod(SampleBean.class, methodName, parameterTypes);
|
||||
return createInstance(m);
|
||||
}
|
||||
@@ -353,7 +353,7 @@ public class MessagingMessageListenerAdapterTests {
|
||||
}
|
||||
|
||||
protected MessagingMessageListenerAdapter getPayloadInstance(final Object payload,
|
||||
String methodName, Class... parameterTypes) {
|
||||
String methodName, Class<?>... parameterTypes) {
|
||||
|
||||
Method method = ReflectionUtils.findMethod(SampleBean.class, methodName, parameterTypes);
|
||||
MessagingMessageListenerAdapter adapter = new MessagingMessageListenerAdapter() {
|
||||
@@ -435,6 +435,7 @@ public class MessagingMessageListenerAdapterTests {
|
||||
interface Summary {};
|
||||
interface Full extends Summary {};
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class SampleResponse {
|
||||
|
||||
private int counter = 42;
|
||||
@@ -445,9 +446,6 @@ public class MessagingMessageListenerAdapterTests {
|
||||
@JsonView(Full.class)
|
||||
private String description;
|
||||
|
||||
SampleResponse() {
|
||||
}
|
||||
|
||||
public SampleResponse(String name, String description) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -392,6 +392,7 @@ public class JmsInvokerTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("rawtypes")
|
||||
public boolean isBodyAssignableTo(Class c) throws JMSException {
|
||||
return false;
|
||||
}
|
||||
@@ -451,6 +452,7 @@ public class JmsInvokerTests {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("rawtypes")
|
||||
public Enumeration getPropertyNames() throws JMSException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -311,6 +311,7 @@ public class MappingJackson2MessageConverterTests {
|
||||
private interface Full extends Summary {};
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class MyAnotherBean {
|
||||
|
||||
@JsonView(Summary.class)
|
||||
|
||||
Reference in New Issue
Block a user