We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a319c3 commit b9ba0fcCopy full SHA for b9ba0fc
spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java
@@ -81,7 +81,7 @@ public static <T> T singleResult(@Nullable Stream<T> results) throws IncorrectRe
81
if (resultList.size() > 1) {
82
throw new IncorrectResultSizeDataAccessException(1);
83
}
84
- return resultList.isEmpty() ? null : resultList.get(0);
+ return (!resultList.isEmpty() ? resultList.get(0) : null);
85
86
87
0 commit comments