Skip to content

Commit

Permalink
Merge pull request #3138 from dukbong/Refactoring
Browse files Browse the repository at this point in the history
Use isEmpty() instead of length()
  • Loading branch information
hazendaz committed Apr 14, 2024
2 parents 382cbf4 + a020b39 commit e9e9a29
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -65,7 +65,7 @@ private void processGeneratedKeys(Executor executor, MappedStatement ms, Object
// The transaction will be closed by parent executor.
Executor keyExecutor = configuration.newExecutor(executor.getTransaction(), ExecutorType.SIMPLE);
List<Object> values = keyExecutor.query(keyStatement, parameter, RowBounds.DEFAULT, Executor.NO_RESULT_HANDLER);
if (values.size() == 0) {
if (values.isEmpty()) {
throw new ExecutorException("SelectKey returned no data.");
}
if (values.size() > 1) {
Expand Down

0 comments on commit e9e9a29

Please sign in to comment.