diff --git a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/ResolvingAggregateReference.java b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/ResolvingAggregateReference.java index 081d198e0..bc70e723c 100644 --- a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/ResolvingAggregateReference.java +++ b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/ResolvingAggregateReference.java @@ -44,7 +44,8 @@ public class ResolvingAggregateReference implements AggregateReference aggregateResolver, Function identifierResolver) { @@ -71,42 +72,27 @@ public class ResolvingAggregateReference implements AggregateReference 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 withIdSource(Function extractor) { return new ResolvingAggregateReference<>(source, aggregateResolver, identifierResolver, STARTER.andThen(extractor)); diff --git a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/UriToEntityConverter.java b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/UriToEntityConverter.java index 23747b2f3..63ae8d254 100644 --- a/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/UriToEntityConverter.java +++ b/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/UriToEntityConverter.java @@ -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) { @@ -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()));