Browse Source

Wrap exceptionally long lines

pull/35363/head
Sam Brannen 4 months ago
parent
commit
bb2a259d85
  1. 12
      spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java

12
spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java

@ -116,7 +116,9 @@ public abstract class DataAccessUtils { @@ -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 { @@ -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 { @@ -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)) {

Loading…
Cancel
Save