Nullability refinements on private and static methods

Based on IntelliJ IDEA 2017.3 introspection results.

Issue: SPR-15756
This commit is contained in:
Juergen Hoeller
2017-09-22 18:22:12 +02:00
parent 60f47f4489
commit 7ae59d0c2a
88 changed files with 319 additions and 300 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 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.
@@ -688,14 +688,10 @@ public class StoredProcedureTests {
setDataSource(ds);
setSql(SQL);
getJdbcTemplate().setExceptionTranslator(new SQLExceptionTranslator() {
@Override
@Nullable
public DataAccessException translate(String task, @Nullable String sql,
SQLException sqlex) {
return new CustomDataException(sql, sqlex);
public DataAccessException translate(String task, @Nullable String sql, SQLException ex) {
return new CustomDataException(sql, ex);
}
});
compile();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2017 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.
@@ -28,6 +28,7 @@ import org.springframework.lang.Nullable;
* @author Thomas Risberg
*/
public class CustomSqlExceptionTranslator implements SQLExceptionTranslator {
@Override
public DataAccessException translate(String task, @Nullable String sql, SQLException ex) {
if (ex.getErrorCode() == 2) {
@@ -35,4 +36,5 @@ public class CustomSqlExceptionTranslator implements SQLExceptionTranslator {
}
return null;
}
}