Nullability refinements on private and static methods
Based on IntelliJ IDEA 2017.3 introspection results. Issue: SPR-15756
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user