mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Wrap exceptionally long lines
This commit is contained in:
@@ -116,7 +116,9 @@ public abstract class DataAccessUtils {
|
||||
* element has been found in the given Collection
|
||||
* @since 6.1
|
||||
*/
|
||||
public static <T extends @Nullable Object> Optional<@NonNull T> optionalResult(@Nullable Collection<T> results) throws IncorrectResultSizeDataAccessException {
|
||||
public static <T extends @Nullable Object> Optional<@NonNull T> optionalResult(@Nullable Collection<T> results)
|
||||
throws IncorrectResultSizeDataAccessException {
|
||||
|
||||
return Optional.ofNullable(singleResult(results));
|
||||
}
|
||||
|
||||
@@ -159,7 +161,9 @@ public abstract class DataAccessUtils {
|
||||
* @throws EmptyResultDataAccessException if no element at all
|
||||
* has been found in the given Collection
|
||||
*/
|
||||
public static <T extends @Nullable Object> @NonNull T requiredSingleResult(@Nullable Collection<T> results) throws IncorrectResultSizeDataAccessException {
|
||||
public static <T extends @Nullable Object> @NonNull T requiredSingleResult(@Nullable Collection<T> results)
|
||||
throws IncorrectResultSizeDataAccessException {
|
||||
|
||||
if (CollectionUtils.isEmpty(results)) {
|
||||
throw new EmptyResultDataAccessException(1);
|
||||
}
|
||||
@@ -185,7 +189,9 @@ public abstract class DataAccessUtils {
|
||||
* has been found in the given Collection
|
||||
* @since 5.0.2
|
||||
*/
|
||||
public static <T extends @Nullable Object> T nullableSingleResult(@Nullable Collection<T> results) throws IncorrectResultSizeDataAccessException {
|
||||
public static <T extends @Nullable Object> T nullableSingleResult(@Nullable Collection<T> results)
|
||||
throws IncorrectResultSizeDataAccessException {
|
||||
|
||||
// This is identical to the requiredSingleResult implementation but differs in the
|
||||
// semantics of the incoming Collection (which we currently can't formally express)
|
||||
if (CollectionUtils.isEmpty(results)) {
|
||||
|
||||
Reference in New Issue
Block a user