JDBC, JMS, JPA Sonar fixes

This commit is contained in:
Gary Russell
2018-10-26 14:26:43 -04:00
parent 1e66b6b55d
commit 2b9ba714e6
7 changed files with 29 additions and 17 deletions

View File

@@ -702,7 +702,7 @@ public abstract class MessagingGatewaySupport extends AbstractEndpoint
* @return the error message.
* @since 4.3.10
*/
protected final ErrorMessage buildErrorMessage(Message<?> requestMessage, Throwable throwable) {
protected final ErrorMessage buildErrorMessage(@Nullable Message<?> requestMessage, Throwable throwable) {
return this.errorMessageStrategy.buildErrorMessage(throwable, getErrorMessageAttributes(requestMessage));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 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.
@@ -33,6 +33,7 @@ import org.springframework.integration.expression.ExpressionUtils;
import org.springframework.integration.support.DefaultMessageBuilderFactory;
import org.springframework.integration.support.MessageBuilderFactory;
import org.springframework.integration.support.utils.IntegrationUtils;
import org.springframework.lang.Nullable;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandlingException;
@@ -63,7 +64,7 @@ public abstract class AbstractExpressionEvaluator implements BeanFactoryAware, I
* Specify a BeanFactory in order to enable resolution via <code>@beanName</code> in the expression.
*/
@Override
public void setBeanFactory(final BeanFactory beanFactory) {
public void setBeanFactory(final @Nullable BeanFactory beanFactory) {
if (beanFactory != null) {
this.beanFactory = beanFactory;
this.typeConverter.setBeanFactory(beanFactory);