Skip to content

Commit df6ca3d

Browse files
committed
Polishing.
Add missing Override annotations, consistently use literal tags for boolean values.
1 parent e15ea58 commit df6ca3d

20 files changed

+39
-40
lines changed

src/main/java/org/springframework/data/auditing/AuditingHandlerSupport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public AuditingHandlerSupport(PersistentEntities entities) {
6161
/**
6262
* Setter do determine if {@link Auditable#setCreatedDate(TemporalAccessor)}} and
6363
* {@link Auditable#setLastModifiedDate(TemporalAccessor)} shall be filled with the current Java time. Defaults to
64-
* {@code true}. One might set this to {@code false} to use database features to set entity time.
64+
* {@literal true}. One might set this to {@literal false} to use database features to set entity time.
6565
*
6666
* @param dateTimeForNow the dateTimeForNow to set
6767
*/
@@ -71,7 +71,7 @@ public void setDateTimeForNow(boolean dateTimeForNow) {
7171

7272
/**
7373
* Set this to true if you want to treat entity creation as modification and thus setting the current date as
74-
* modification date during creation, too. Defaults to {@code true}.
74+
* modification date during creation, too. Defaults to {@literal true}.
7575
*
7676
* @param modifyOnCreation if modification information shall be set on creation, too
7777
*/

src/main/java/org/springframework/data/domain/Window.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ static <T> Window<T> from(List<T> items, IntFunction<? extends ScrollPosition> p
6868
int size();
6969

7070
/**
71-
* Returns {@code true} if this window contains no elements.
71+
* Returns {@literal true} if this window contains no elements.
7272
*
73-
* @return {@code true} if this window contains no elements
73+
* @return {@literal true} if this window contains no elements
7474
*/
7575
@Override
7676
boolean isEmpty();
@@ -102,7 +102,7 @@ default boolean isLast() {
102102
* Returns whether the underlying scroll mechanism can provide a {@link ScrollPosition} at {@code index}.
103103
*
104104
* @param index
105-
* @return {@code true} if a {@link ScrollPosition} can be created; {@code false} otherwise.
105+
* @return {@literal true} if a {@link ScrollPosition} can be created; {@literal false} otherwise.
106106
* @see #positionAt(int)
107107
*/
108108
default boolean hasPosition(int index) {

src/main/java/org/springframework/data/expression/ValueExpression.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ default ExpressionDependencies getExpressionDependencies() {
4848
/**
4949
* Returns whether the expression is a literal expression (that doesn't actually require evaluation).
5050
*
51-
* @return {@code true} if the expression is a literal expression; {@code false} if the expression can yield a
51+
* @return {@literal true} if the expression is a literal expression; {@literal false} if the expression can yield a
5252
* different result upon {@link #evaluate(ValueEvaluationContext) evaluation}.
5353
*/
5454
boolean isLiteral();

src/main/java/org/springframework/data/mapping/Alias.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/**
2424
* A container object which may or may not contain a type alias value. If a value is present, {@code isPresent()} will
25-
* return {@code true} and {@link #getValue()} will return the value.
25+
* return {@literal true} and {@link #getValue()} will return the value.
2626
* <p>
2727
* Additional methods that depend on the presence or absence of a contained value are provided, such as
2828
* {@link #hasValue(Object)} or {@link #isPresent()}

src/main/java/org/springframework/data/mapping/PersistentEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ default P getPersistentProperty(Class<? extends Annotation> annotationType) {
229229
* Returns whether the property is transient.
230230
*
231231
* @param property name of the property.
232-
* @return {@code true} if the property is transient. Applies only for existing properties. {@code false} if the
232+
* @return {@literal true} if the property is transient. Applies only for existing properties. {@literal false} if the
233233
* property does not exist or is not transient.
234234
* @since 3.3
235235
*/

src/main/java/org/springframework/data/mapping/model/AnnotationBasedPersistentProperty.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ public <A extends Annotation> A findPropertyOrOwnerAnnotation(Class<A> annotatio
264264
}
265265

266266
/**
267-
* Returns whether the property carries the an annotation of the given type.
267+
* Returns whether the property carries the annotation of the given type.
268268
*
269269
* @param annotationType the annotation type to look up.
270-
* @return
270+
* @return {@literal true} if the annotation is present, {@literal false} otherwise.
271271
*/
272272
@Override
273273
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {

src/main/java/org/springframework/data/mapping/model/KotlinValueUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ public Class<?> getParameterType() {
348348
}
349349

350350
/**
351-
* @return {@code true} if the value hierarchy applies boxing.
351+
* @return {@literal true} if the value hierarchy applies boxing.
352352
*/
353353
public boolean appliesBoxing() {
354354
return applyBoxing;

src/main/java/org/springframework/data/mapping/model/PersistentEntityParameterValueProvider.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626

2727
/**
2828
* {@link ParameterValueProvider} based on a {@link PersistentEntity} to use a {@link PropertyValueProvider} to look up
29-
* the value of the property referenced by the given {@link Parameter}. Additionally, a
30-
* {@link DefaultSpELExpressionEvaluator} can be configured to get property value resolution trumped by a SpEL
31-
* expression evaluation.
29+
* the value of the property referenced by the given {@link Parameter}.
3230
*
3331
* @author Oliver Gierke
3432
* @author Johannes Englmeier
@@ -42,18 +40,13 @@ public class PersistentEntityParameterValueProvider<P extends PersistentProperty
4240
private final @Nullable Object parent;
4341

4442
public PersistentEntityParameterValueProvider(PersistentEntity<?, P> entity, PropertyValueProvider<P> provider,
45-
Object parent) {
43+
@Nullable Object parent) {
4644
this.entity = entity;
4745
this.provider = provider;
4846
this.parent = parent;
4947
}
5048

5149
@Override
52-
@Nullable
53-
private static Object getTransientDefault(Class<?> parameterType) {
54-
return parameterType.isPrimitive() ? ReflectionUtils.getPrimitiveDefault(parameterType) : null;
55-
}
56-
5750
@Nullable
5851
@SuppressWarnings("unchecked")
5952
public <T> T getParameterValue(Parameter<T, P> parameter) {
@@ -82,4 +75,10 @@ public <T> T getParameterValue(Parameter<T, P> parameter) {
8275

8376
return provider.getPropertyValue(property);
8477
}
78+
79+
@Nullable
80+
private static Object getTransientDefault(Class<?> parameterType) {
81+
return parameterType.isPrimitive() ? ReflectionUtils.getPrimitiveDefault(parameterType) : null;
82+
}
83+
8584
}

src/main/java/org/springframework/data/projection/EntityProjection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ public TypeInformation<?> getActualDomainType() {
158158
}
159159

160160
/**
161-
* @return {@code true} if the {@link #getMappedType()} is a projection.
161+
* @return {@literal true} if the {@link #getMappedType()} is a projection.
162162
*/
163163
public boolean isProjection() {
164164
return projection;
165165
}
166166

167167
/**
168-
* @return {@code true} if the {@link #getMappedType()} is a closed projection.
168+
* @return {@literal true} if the {@link #getMappedType()} is a closed projection.
169169
*/
170170
public boolean isClosedProjection() {
171171
return isProjection()

src/main/java/org/springframework/data/projection/EntityProjectionIntrospector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,13 @@ public interface ProjectionPredicate {
222222
*
223223
* @param target the target type.
224224
* @param underlyingType the underlying type.
225-
* @return {@code true} if the input argument matches the predicate, otherwise {@code false}.
225+
* @return {@literal true} if the input argument matches the predicate, otherwise {@literal false}.
226226
*/
227227
boolean test(Class<?> target, Class<?> underlyingType);
228228

229229
/**
230230
* Return a composed predicate that represents a short-circuiting logical AND of this predicate and another. When
231-
* evaluating the composed predicate, if this predicate is {@code false}, then the {@code other} predicate is not
231+
* evaluating the composed predicate, if this predicate is {@literal false}, then the {@code other} predicate is not
232232
* evaluated.
233233
* <p>
234234
* Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this

0 commit comments

Comments
 (0)