Skip to content

Commit 63acff9

Browse files
committed
Refine @SuppressWarnings("NullAway")
See spring-projectsgh-28797
1 parent e184860 commit 63acff9

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public void setBeanClassLoader(ClassLoader classLoader) {
158158

159159

160160
@Override
161-
@SuppressWarnings("NullAway") // Lazy initialization
161+
@SuppressWarnings("NullAway") // Dataflow analysis limitation
162162
public void afterPropertiesSet() throws ClassNotFoundException, NoSuchFieldException {
163163
if (this.targetClass != null && this.targetObject != null) {
164164
throw new IllegalArgumentException("Specify either targetClass or targetObject, not both");

spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SingleConnectionDataSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public void setAutoCommit(boolean autoCommit) {
179179

180180

181181
@Override
182-
@SuppressWarnings("NullAway") // Lazy initialization
182+
@SuppressWarnings("NullAway") // Dataflow analysis limitation
183183
public Connection getConnection() throws SQLException {
184184
this.connectionLock.lock();
185185
try {

spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public void setDatabasePopulator(DatabasePopulator populator) {
159159
* Factory method that returns the {@linkplain EmbeddedDatabase embedded database}
160160
* instance, which is also a {@link DataSource}.
161161
*/
162-
@SuppressWarnings("NullAway") // Lazy initialization
162+
@SuppressWarnings("NullAway") // Dataflow analysis limitation
163163
public EmbeddedDatabase getDatabase() {
164164
if (this.dataSource == null) {
165165
initDatabase();

spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/AbstractColumnMaxValueIncrementer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public abstract class AbstractColumnMaxValueIncrementer extends AbstractDataFiel
4343
* @see #setIncrementerName
4444
* @see #setColumnName
4545
*/
46-
@SuppressWarnings("NullAway")
46+
@SuppressWarnings("NullAway.Init")
4747
public AbstractColumnMaxValueIncrementer() {
4848
}
4949

spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ private ConnectionFactory obtainTargetConnectionFactory() {
323323
* @throws jakarta.jms.JMSException if thrown by JMS API methods
324324
* @see #initConnection()
325325
*/
326-
@SuppressWarnings("NullAway") // Lazy initialization
326+
@SuppressWarnings("NullAway") // Dataflow analysis limitation
327327
protected Connection getConnection() throws JMSException {
328328
this.connectionLock.lock();
329329
try {

spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,7 @@ private void decreaseActiveInvokerCount() {
14341434
}
14351435
}
14361436

1437-
@SuppressWarnings("NullAway") // Lazy initialization
1437+
@SuppressWarnings("NullAway") // Dataflow analysis limitation
14381438
private void initResourcesIfNecessary() throws JMSException {
14391439
if (getCacheLevel() <= CACHE_CONNECTION) {
14401440
updateRecoveryMarker();

0 commit comments

Comments
 (0)