Skip to content

Commit b084f67

Browse files
committed
Polishing.
Fix invalid Javadoc references. See #2239
1 parent e4bca53 commit b084f67

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

Diff for: spring-data-rest-core/src/main/java/org/springframework/data/rest/core/ResolvingAggregateReference.java

+3-17
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public class ResolvingAggregateReference<T, ID> implements AggregateReference<T,
4444
* against the given resolver function.
4545
*
4646
* @param source must not be {@literal null}.
47-
* @param resolver must not be {@literal null}.
47+
* @param aggregateResolver must not be {@literal null}.
48+
* @param identifierResolver must not be {@literal null}.
4849
*/
4950
public ResolvingAggregateReference(URI source, Function<Object, ? extends T> aggregateResolver,
5051
Function<Object, ? extends ID> identifierResolver) {
@@ -71,42 +72,27 @@ protected ResolvingAggregateReference(URI source, Function<Object, ? extends T>
7172
*
7273
* @param source must not be {@literal null}.
7374
* @param value can be {@literal null}.
75+
* @param identifier must not be {@literal null}.
7476
*/
7577
public ResolvingAggregateReference(URI source, @Nullable T value, ID identifier) {
7678
this(source, __ -> value, __ -> identifier, it -> it);
7779
}
7880

79-
/*
80-
* (non-Javadoc)
81-
* @see org.springframework.data.rest.core.Foo#getURI()
82-
*/
8381
@Override
8482
public URI getUri() {
8583
return source;
8684
}
8785

88-
/*
89-
* (non-Javadoc)
90-
* @see org.springframework.data.rest.core.AggregateReference#resolveId()
91-
*/
9286
@Override
9387
public ID resolveId() {
9488
return extractor.andThen(identifierResolver).apply(source);
9589
}
9690

97-
/*
98-
* (non-Javadoc)
99-
* @see org.springframework.data.rest.core.AggregateReference#resolveAggregate()
100-
*/
10191
@Override
10292
public T resolveAggregate() {
10393
return extractor.andThen(aggregateResolver).apply(source);
10494
}
10595

106-
/*
107-
* (non-Javadoc)
108-
* @see org.springframework.data.rest.core.AggregateReference#withExtractor(java.util.function.Function)
109-
*/
11096
@Override
11197
public AggregateReference<T, ID> withIdSource(Function<UriComponents, Object> extractor) {
11298
return new ResolvingAggregateReference<>(source, aggregateResolver, identifierResolver, STARTER.andThen(extractor));

Diff for: spring-data-rest-core/src/main/java/org/springframework/data/rest/core/UriToEntityConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class UriToEntityConverter implements GenericConverter {
5757
*
5858
* @param entities must not be {@literal null}.
5959
* @param invokerFactory must not be {@literal null}.
60-
* @param repositories must not be {@literal null}.
60+
* @param conversionService must not be {@literal null}.
6161
*/
6262
public UriToEntityConverter(PersistentEntities entities, RepositoryInvokerFactory invokerFactory,
6363
Supplier<ConversionService> conversionService) {
@@ -118,7 +118,7 @@ public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDe
118118

119119
var entity = entities.getPersistentEntity(targetType.getType());
120120

121-
if (!entity.isPresent()) {
121+
if (entity.isEmpty()) {
122122
throw new ConversionFailedException(sourceType, targetType, source,
123123
new IllegalArgumentException(
124124
"No PersistentEntity information available for " + targetType.getType()));

0 commit comments

Comments
 (0)