Perform NullAway build-time checks in spring-jms
See gh-32475
This commit is contained in:
@@ -285,6 +285,7 @@ public abstract class ConnectionFactoryUtils {
|
||||
* @throws JMSException in case of JMS failure
|
||||
*/
|
||||
@Nullable
|
||||
@SuppressWarnings("NullAway")
|
||||
public static Session doGetTransactionalSession(
|
||||
ConnectionFactory connectionFactory, ResourceFactory resourceFactory, boolean startConnection)
|
||||
throws JMSException {
|
||||
|
||||
@@ -332,6 +332,7 @@ public class SingleConnectionFactory implements ConnectionFactory, QueueConnecti
|
||||
* @throws jakarta.jms.JMSException if thrown by JMS API methods
|
||||
* @see #initConnection()
|
||||
*/
|
||||
@SuppressWarnings("NullAway")
|
||||
protected Connection getConnection() throws JMSException {
|
||||
this.connectionLock.lock();
|
||||
try {
|
||||
|
||||
@@ -1440,6 +1440,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("NullAway")
|
||||
private void initResourcesIfNecessary() throws JMSException {
|
||||
if (getCacheLevel() <= CACHE_CONNECTION) {
|
||||
updateRecoveryMarker();
|
||||
|
||||
@@ -315,6 +315,7 @@ public class SimpleMessageListenerContainer extends AbstractMessageListenerConta
|
||||
* @throws JMSException if thrown by JMS methods
|
||||
* @see #executeListener
|
||||
*/
|
||||
@SuppressWarnings("NullAway")
|
||||
protected MessageConsumer createListenerConsumer(final Session session) throws JMSException {
|
||||
Destination destination = getDestination();
|
||||
if (destination == null) {
|
||||
|
||||
Reference in New Issue
Block a user