[FEAT] assert when try to insart null data
This commit is contained in:
parent
0d419f651e
commit
8f3c14e28d
@ -815,6 +815,9 @@ public class DBAccessSQL extends DBAccess {
|
|||||||
@Override
|
@Override
|
||||||
@SuppressFBWarnings("SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING")
|
@SuppressFBWarnings("SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING")
|
||||||
public <T> T insert(final T data, final QueryOption... option) throws Exception {
|
public <T> T insert(final T data, final QueryOption... option) throws Exception {
|
||||||
|
if (data == null) {
|
||||||
|
throw new DataAccessException("Try to check a null data ==> wrong API");
|
||||||
|
}
|
||||||
final Class<?> clazz = data.getClass();
|
final Class<?> clazz = data.getClass();
|
||||||
final QueryOptions options = new QueryOptions(option);
|
final QueryOptions options = new QueryOptions(option);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user