@@ -116,7 +116,9 @@ public abstract class DataAccessUtils {
116116 * element has been found in the given Collection
117117 * @since 6.1
118118 */
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+
120122 return Optional .ofNullable (singleResult (results ));
121123 }
122124
@@ -159,7 +161,9 @@ public static <T> Optional<T> optionalResult(@Nullable Iterator<T> results) thro
159161 * @throws EmptyResultDataAccessException if no element at all
160162 * has been found in the given Collection
161163 */
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+
163167 if (CollectionUtils .isEmpty (results )) {
164168 throw new EmptyResultDataAccessException (1 );
165169 }
@@ -185,7 +189,9 @@ public static <T> Optional<T> optionalResult(@Nullable Iterator<T> results) thro
185189 * has been found in the given Collection
186190 * @since 5.0.2
187191 */
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+
189195 // This is identical to the requiredSingleResult implementation but differs in the
190196 // semantics of the incoming Collection (which we currently can't formally express)
191197 if (CollectionUtils .isEmpty (results )) {
0 commit comments