Skip to content

Commit

Permalink
Refine @SuppressWarnings("NullAway")
Browse files Browse the repository at this point in the history
  • Loading branch information
sdeleuze committed Jan 8, 2025
1 parent 82941ca commit a73a819
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public void setBeanClassLoader(ClassLoader classLoader) {


@Override
@SuppressWarnings("NullAway") // Lazy initialization
@SuppressWarnings("NullAway") // Dataflow analysis limitation
public void afterPropertiesSet() throws ClassNotFoundException, NoSuchFieldException {
if (this.targetClass != null && this.targetObject != null) {
throw new IllegalArgumentException("Specify either targetClass or targetObject, not both");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void setAutoCommit(boolean autoCommit) {


@Override
@SuppressWarnings("NullAway") // Lazy initialization
@SuppressWarnings("NullAway") // Dataflow analysis limitation
public Connection getConnection() throws SQLException {
this.connectionLock.lock();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public void setDatabasePopulator(DatabasePopulator populator) {
* Factory method that returns the {@linkplain EmbeddedDatabase embedded database}
* instance, which is also a {@link DataSource}.
*/
@SuppressWarnings("NullAway") // Lazy initialization
@SuppressWarnings("NullAway") // Dataflow analysis limitation
public EmbeddedDatabase getDatabase() {
if (this.dataSource == null) {
initDatabase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public abstract class AbstractColumnMaxValueIncrementer extends AbstractDataFiel
* @see #setIncrementerName
* @see #setColumnName
*/
@SuppressWarnings("NullAway")
@SuppressWarnings("NullAway.Init")
public AbstractColumnMaxValueIncrementer() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ private ConnectionFactory obtainTargetConnectionFactory() {
* @throws jakarta.jms.JMSException if thrown by JMS API methods
* @see #initConnection()
*/
@SuppressWarnings("NullAway") // Lazy initialization
@SuppressWarnings("NullAway") // Dataflow analysis limitation
protected Connection getConnection() throws JMSException {
this.connectionLock.lock();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ private void decreaseActiveInvokerCount() {
}
}

@SuppressWarnings("NullAway") // Lazy initialization
@SuppressWarnings("NullAway") // Dataflow analysis limitation
private void initResourcesIfNecessary() throws JMSException {
if (getCacheLevel() <= CACHE_CONNECTION) {
updateRecoveryMarker();
Expand Down

0 comments on commit a73a819

Please sign in to comment.