diff --git a/src/main/java/org/springframework/data/mapping/PersistentPropertyPaths.java b/src/main/java/org/springframework/data/mapping/PersistentPropertyPaths.java index bc308d5c3..29daeb488 100644 --- a/src/main/java/org/springframework/data/mapping/PersistentPropertyPaths.java +++ b/src/main/java/org/springframework/data/mapping/PersistentPropertyPaths.java @@ -22,7 +22,7 @@ import org.springframework.data.util.Streamable; /** * A wrapper for a collection of {@link PersistentPropertyPath}s. - * + * * @author Oliver Gierke * @since 2.1 * @soundtrack Stuart McCallum - North Star (City) @@ -32,14 +32,14 @@ public interface PersistentPropertyPaths> /** * Returns the first {@link PersistentPropertyPath}. - * + * * @return */ Optional> getFirst(); /** * Returns whether the given path is contained in the current {@link PersistentPropertyPaths}. - * + * * @param path must not be {@literal null}. * @return */ @@ -47,7 +47,7 @@ public interface PersistentPropertyPaths> /** * Returns whether the given {@link PropertyPath} is contained in the current {@link PersistentPropertyPaths}. - * + * * @param path must not be {@literal null}. * @return */ diff --git a/src/main/java/org/springframework/data/mapping/context/PersistentPropertyPathFactory.java b/src/main/java/org/springframework/data/mapping/context/PersistentPropertyPathFactory.java index 09202ee74..8e5c1cf7b 100644 --- a/src/main/java/org/springframework/data/mapping/context/PersistentPropertyPathFactory.java +++ b/src/main/java/org/springframework/data/mapping/context/PersistentPropertyPathFactory.java @@ -20,17 +20,7 @@ import lombok.RequiredArgsConstructor; import lombok.ToString; import lombok.Value; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Optional; -import java.util.Set; +import java.util.*; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -54,7 +44,7 @@ import org.springframework.util.StringUtils; /** * A factory implementation to create {@link PersistentPropertyPath} instances in various ways. - * + * * @author Oliver Gierke * @since 2.1 * @soundtrack Cypress Hill - Boom Biddy Bye Bye (Fugees Remix, Unreleased & Revamped) @@ -69,7 +59,7 @@ class PersistentPropertyPathFactory, P extends /** * Creates a new {@link PersistentPropertyPath} for the given property path on the given type. - * + * * @param type must not be {@literal null}. * @param propertyPath must not be {@literal null}. * @return @@ -84,7 +74,7 @@ class PersistentPropertyPathFactory, P extends /** * Creates a new {@link PersistentPropertyPath} for the given property path on the given type. - * + * * @param type must not be {@literal null}. * @param propertyPath must not be {@literal null}. * @return @@ -99,7 +89,7 @@ class PersistentPropertyPathFactory, P extends /** * Creates a new {@link PersistentPropertyPath} for the given {@link PropertyPath}. - * + * * @param path must not be {@literal null}. * @return */ @@ -113,7 +103,7 @@ class PersistentPropertyPathFactory, P extends /** * Creates a new {@link PersistentPropertyPath} based on a given type and {@link Predicate} to select properties * matching it. - * + * * @param type must not be {@literal null}. * @param propertyFilter must not be {@literal null}. * @return @@ -129,7 +119,7 @@ class PersistentPropertyPathFactory, P extends /** * Creates a new {@link PersistentPropertyPath} based on a given type and {@link Predicate} to select properties * matching it. - * + * * @param type must not be {@literal null}. * @param propertyFilter must not be {@literal null}. * @param traversalGuard must not be {@literal null}. @@ -148,7 +138,7 @@ class PersistentPropertyPathFactory, P extends /** * Creates a new {@link PersistentPropertyPath} based on a given type and {@link Predicate} to select properties * matching it. - * + * * @param type must not be {@literal null}. * @param propertyFilter must not be {@literal null}. * @return @@ -160,7 +150,7 @@ class PersistentPropertyPathFactory, P extends /** * Creates a new {@link PersistentPropertyPath} based on a given type and {@link Predicate} to select properties * matching it. - * + * * @param type must not be {@literal null}. * @param propertyFilter must not be {@literal null}. * @param traversalGuard must not be {@literal null}. @@ -297,7 +287,7 @@ class PersistentPropertyPathFactory, P extends /** * Creates a new {@link DefaultPersistentPropertyPaths} instance - * + * * @param type * @param paths * @return @@ -312,7 +302,7 @@ class PersistentPropertyPathFactory, P extends return new DefaultPersistentPropertyPaths<>(type, sorted); } - /* + /* * (non-Javadoc) * @see org.springframework.data.mapping.PersistentPropertyPaths#getFirst() */ @@ -321,7 +311,7 @@ class PersistentPropertyPathFactory, P extends return isEmpty() ? Optional.empty() : Optional.of(iterator().next()); } - /* + /* * (non-Javadoc) * @see org.springframework.data.mapping.PersistentPropertyPaths#contains(java.lang.String) */ @@ -330,7 +320,7 @@ class PersistentPropertyPathFactory, P extends return contains(PropertyPath.from(path, type)); } - /* + /* * (non-Javadoc) * @see org.springframework.data.mapping.PersistentPropertyPaths#contains(org.springframework.data.mapping.PropertyPath) */ @@ -348,7 +338,7 @@ class PersistentPropertyPathFactory, P extends return stream().anyMatch(it -> dotPath.equals(it.toDotPath())); } - /* + /* * (non-Javadoc) * @see java.lang.Iterable#iterator() */ @@ -376,7 +366,7 @@ class PersistentPropertyPathFactory, P extends /** * Simple {@link Comparator} to sort {@link PersistentPropertyPath} instances by their property segment's name * length. - * + * * @author Oliver Gierke * @since 2.1 */