Perform NullAway build-time checks in spring-jms
See gh-32475
This commit is contained in:
@@ -118,7 +118,7 @@ tasks.withType(JavaCompile).configureEach {
|
||||
disableAllChecks = true
|
||||
option("NullAway:CustomContractAnnotations", "org.springframework.lang.Contract")
|
||||
option("NullAway:AnnotatedPackages", "org.springframework.core,org.springframework.expression," +
|
||||
"org.springframework.web")
|
||||
"org.springframework.web,org.springframework.jms")
|
||||
option("NullAway:UnannotatedSubPackages", "org.springframework.instrument,org.springframework.context.index," +
|
||||
"org.springframework.asm,org.springframework.cglib,org.springframework.objenesis," +
|
||||
"org.springframework.javapoet,org.springframework.aot.nativex.substitution")
|
||||
|
||||
@@ -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