Polishing.

Fix invalid Javadoc references.

See #2239
This commit is contained in:
Mark Paluch
2023-03-20 08:21:12 +01:00
parent e4bca534bf
commit b084f67189
2 changed files with 5 additions and 19 deletions

View File

@@ -44,7 +44,8 @@ public class ResolvingAggregateReference<T, ID> implements AggregateReference<T,
* against the given resolver function.
*
* @param source must not be {@literal null}.
* @param resolver must not be {@literal null}.
* @param aggregateResolver must not be {@literal null}.
* @param identifierResolver must not be {@literal null}.
*/
public ResolvingAggregateReference(URI source, Function<Object, ? extends T> aggregateResolver,
Function<Object, ? extends ID> identifierResolver) {
@@ -71,42 +72,27 @@ public class ResolvingAggregateReference<T, ID> implements AggregateReference<T,
*
* @param source must not be {@literal null}.
* @param value can be {@literal null}.
* @param identifier must not be {@literal null}.
*/
public ResolvingAggregateReference(URI source, @Nullable T value, ID identifier) {
this(source, __ -> value, __ -> identifier, it -> it);
}
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.Foo#getURI()
*/
@Override
public URI getUri() {
return source;
}
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.AggregateReference#resolveId()
*/
@Override
public ID resolveId() {
return extractor.andThen(identifierResolver).apply(source);
}
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.AggregateReference#resolveAggregate()
*/
@Override
public T resolveAggregate() {
return extractor.andThen(aggregateResolver).apply(source);
}
/*
* (non-Javadoc)
* @see org.springframework.data.rest.core.AggregateReference#withExtractor(java.util.function.Function)
*/
@Override
public AggregateReference<T, ID> withIdSource(Function<UriComponents, Object> extractor) {
return new ResolvingAggregateReference<>(source, aggregateResolver, identifierResolver, STARTER.andThen(extractor));

View File

@@ -57,7 +57,7 @@ public class UriToEntityConverter implements GenericConverter {
*
* @param entities must not be {@literal null}.
* @param invokerFactory must not be {@literal null}.
* @param repositories must not be {@literal null}.
* @param conversionService must not be {@literal null}.
*/
public UriToEntityConverter(PersistentEntities entities, RepositoryInvokerFactory invokerFactory,
Supplier<ConversionService> conversionService) {
@@ -118,7 +118,7 @@ public class UriToEntityConverter implements GenericConverter {
var entity = entities.getPersistentEntity(targetType.getType());
if (!entity.isPresent()) {
if (entity.isEmpty()) {
throw new ConversionFailedException(sourceType, targetType, source,
new IllegalArgumentException(
"No PersistentEntity information available for " + targetType.getType()));