@@ -116,7 +116,9 @@ public abstract class DataAccessUtils {
116
116
* element has been found in the given Collection
117
117
* @since 6.1
118
118
*/
119
- public static <T extends @ Nullable Object > Optional <@ NonNull T > optionalResult (@ Nullable Collection <T > results ) throws IncorrectResultSizeDataAccessException {
119
+ public static <T extends @ Nullable Object > Optional <@ NonNull T > optionalResult (@ Nullable Collection <T > results )
120
+ throws IncorrectResultSizeDataAccessException {
121
+
120
122
return Optional .ofNullable (singleResult (results ));
121
123
}
122
124
@@ -159,7 +161,9 @@ public static <T> Optional<T> optionalResult(@Nullable Iterator<T> results) thro
159
161
* @throws EmptyResultDataAccessException if no element at all
160
162
* has been found in the given Collection
161
163
*/
162
- public static <T extends @ Nullable Object > @ NonNull T requiredSingleResult (@ Nullable Collection <T > results ) throws IncorrectResultSizeDataAccessException {
164
+ public static <T extends @ Nullable Object > @ NonNull T requiredSingleResult (@ Nullable Collection <T > results )
165
+ throws IncorrectResultSizeDataAccessException {
166
+
163
167
if (CollectionUtils .isEmpty (results )) {
164
168
throw new EmptyResultDataAccessException (1 );
165
169
}
@@ -185,7 +189,9 @@ public static <T> Optional<T> optionalResult(@Nullable Iterator<T> results) thro
185
189
* has been found in the given Collection
186
190
* @since 5.0.2
187
191
*/
188
- public static <T extends @ Nullable Object > T nullableSingleResult (@ Nullable Collection <T > results ) throws IncorrectResultSizeDataAccessException {
192
+ public static <T extends @ Nullable Object > T nullableSingleResult (@ Nullable Collection <T > results )
193
+ throws IncorrectResultSizeDataAccessException {
194
+
189
195
// This is identical to the requiredSingleResult implementation but differs in the
190
196
// semantics of the incoming Collection (which we currently can't formally express)
191
197
if (CollectionUtils .isEmpty (results )) {
0 commit comments