Skip to content

Commit c6b77e3

Browse files
committed
Polish Javadoc to prepare builds with JDK 17.
Issue #2068.
1 parent 806a886 commit c6b77e3

22 files changed

+44
-51
lines changed

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/ValidationErrors.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class ValidationErrors extends AbstractPropertyBindingResult {
5151
* Creates a new {@link ValidationErrors} instance for the given source object and {@link PersistentEntity}.
5252
*
5353
* @param source the source object to gather validation errors on, must not be {@literal null}.
54-
* @param entity the {@link PersistentEntity} for the given source instance, must not be {@literal null}.
54+
* @param entities the {@link PersistentEntities} for the given source instance, must not be {@literal null}.
5555
*/
5656
public ValidationErrors(Object source, PersistentEntities entities) {
5757

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/config/MetadataConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public boolean omitUnresolvableDescriptionKeys() {
5858
/**
5959
* Configures whether to expose the ALPS resources.
6060
*
61-
* @param alpsEnabled the alpsEnabled to set
61+
* @param enableAlps whether to expose ALPS resources.
6262
*/
6363
public void setAlpsEnabled(boolean enableAlps) {
6464
this.alpsEnabled = enableAlps;

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/config/RepositoryRestConfiguration.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
* @author Greg Turnquist
4747
* @author Mark Paluch
4848
*/
49-
@SuppressWarnings("deprecation")
5049
public class RepositoryRestConfiguration {
5150

5251
static final URI NO_URI = URI.create("");
@@ -367,7 +366,7 @@ public boolean returnBodyOnUpdate(String acceptHeader) {
367366
/**
368367
* Set whether to return a response body after updating an entity.
369368
*
370-
* @param returnBody can be {@literal null}, expressing the decision shall be derived from the presence of an
369+
* @param returnBodyOnUpdate can be {@literal null}, expressing the decision shall be derived from the presence of an
371370
* {@code Accept} header in the request.
372371
* @return {@literal this}
373372
*/
@@ -535,7 +534,7 @@ public MetadataConfiguration getMetadataConfiguration() {
535534
/**
536535
* Configures whether to enable enum value translation via the Spring Data REST default resource bundle. Defaults to
537536
* {@literal false} for backwards compatibility reasons. Will use the fully qualified enum name as key. For further
538-
* details see {@link EnumTranslator}.
537+
* details see {code EnumTranslator}.
539538
*
540539
* @param enableEnumTranslation
541540
* @see #getEnumTranslationConfiguration()
@@ -675,7 +674,7 @@ public LinkRelationProvider getRelProvider() {
675674
}
676675

677676
/**
678-
* The {@link RelProvider} to be used to calculate the link relation defaults for repositories.
677+
* The {@link LinkRelationProvider} to be used to calculate the link relation defaults for repositories.
679678
*
680679
* @deprecated since 3.5, use {@link #setLinkRelationProvider(LinkRelationProvider)} instead.
681680
*/

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/mapping/ExposureConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public boolean allowsPutForCreation(ResourceMetadata metadata) {
139139
/**
140140
* Returns whether PUT requests can be used to create new instances of the given domain type.
141141
*
142-
* @param metadata must not be {@literal null}.
142+
* @param domainType must not be {@literal null}.
143143
* @return
144144
*/
145145
public boolean allowsPutForCreation(Class<?> domainType) {

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/mapping/ParameterMetadata.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ public final class ParameterMetadata {
3333
/**
3434
* Creates a new {@link ParameterMetadata} for the given {@link MethodParameter} and base rel.
3535
*
36-
* @param name must not be {@literal null} or empty.
36+
* @param parameter must not be {@literal null} or empty.
3737
* @param baseRel must not be {@literal null} or empty.
3838
*/
3939
public ParameterMetadata(MethodParameter parameter, String baseRel) {
4040

41+
Assert.notNull(parameter, "MethodParameter must not be null!");
42+
4143
this.name = parameter.getParameterName();
4244

4345
Assert.hasText(name, "Parameter name must not be null or empty!");

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/mapping/ResourceMetadata.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ public interface ResourceMetadata extends CollectionResourceMapping {
6565
SearchResourceMappings getSearchResourceMappings();
6666

6767
/**
68-
* Returns the supported {@link HttpMethod}s for the given {@link ResourceType}.
68+
* Returns the supported {@link HttpMethod}s.
6969
*
70-
* @param resourcType must not be {@literal null}.
7170
* @return
7271
*/
7372
SupportedHttpMethods getSupportedHttpMethods();

spring-data-rest-core/src/main/java/org/springframework/data/rest/core/support/RepositoryRelProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import org.springframework.util.Assert;
2525

2626
/**
27-
* A {@link RelProvider} based on the {@link ResourceMappings} for the registered repositories.
27+
* A {@link LinkRelationProvider} based on the {@link ResourceMappings} for the registered repositories.
2828
*
2929
* @author Oliver Gierke
3030
*/

spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/ControllerUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static <R extends RepresentationModel<?>> ResponseEntity<RepresentationMo
4242
}
4343

4444
/**
45-
* Wrap a resource as a {@link ResourceEntity} and attach given headers and status.
45+
* Wrap a resource as a {@link ResponseEntity} and attach given headers and status.
4646
*
4747
* @param status
4848
* @param headers

spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/EmbeddedResourcesAssembler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public EmbeddedResourcesAssembler(PersistentEntities entities, Associations asso
5555
}
5656

5757
/**
58-
* Returns the embedded resources to render. This will add an {@link RelatedResource} for linkable associations if
59-
* they have an excerpt projection registered.
58+
* Returns the embedded resources to render. This will add a projection for linkable associations if they have an
59+
* excerpt projection registered.
6060
*
6161
* @param instance must not be {@literal null}.
6262
* @return

spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/PersistentEntityResource.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
import com.fasterxml.jackson.annotation.JsonIgnore;
3434

3535
/**
36-
* A Spring HATEOAS {@link Resource} subclass that holds a reference to the entity's {@link PersistentEntity} metadata.
36+
* A Spring HATEOAS {@link EntityModel} subclass that holds a reference to the entity's {@link PersistentEntity}
37+
* metadata.
3738
*
3839
* @author Jon Brisbin
3940
* @author Oliver Gierke
@@ -168,8 +169,9 @@ private Builder(Object content, PersistentEntity<?, ?> entity) {
168169
}
169170

170171
/**
171-
* Configures the builder to embed the given {@link EmbeddedWrapper} instances. Creates a {@link Resources} instance
172-
* to make sure the {@link EmbeddedWrapper} handling gets applied to the serialization output ignoring the links.
172+
* Configures the builder to embed the given {@link EmbeddedWrapper} instances. Creates a {@link CollectionModel}
173+
* instance to make sure the {@link EmbeddedWrapper} handling gets applied to the serialization output ignoring the
174+
* links.
173175
*
174176
* @param resources can be {@literal null}.
175177
* @return the builder

0 commit comments

Comments
 (0)