Make getters and setters null-safety consistent
This commit ensure that null-safety is consistent between getters and setters in order to be able to provide beans with properties with a common type when type safety is taken in account like with Kotlin. It also add a few missing property level @Nullable annotations. Issue: SPR-15792
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.jms.listener;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
@@ -28,10 +29,10 @@ public abstract class AbstractMessageListenerContainerTests {
|
||||
|
||||
protected abstract AbstractMessageListenerContainer getContainer();
|
||||
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSettingMessageListenerToANullType() throws Exception {
|
||||
|
||||
public void testSettingMessageListenerToANullType() {
|
||||
getContainer().setMessageListener(null);
|
||||
Assert.assertNull(getContainer().getMessageListener());
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
|
||||
Reference in New Issue
Block a user