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

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

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

2929
/**
30-
* {@link ResourceAssembler} to create {@link PersistentEntityResource}s for arbitrary domain objects.
30+
* {@link RepresentationModelAssembler} to create {@link PersistentEntityResource}s for arbitrary domain objects.
3131
*
3232
* @author Oliver Gierke
3333
*/

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
*/
1616
package org.springframework.data.rest.webmvc;
1717

18-
import org.springframework.beans.factory.annotation.Autowired;
1918
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
2019
import org.springframework.hateoas.Link;
2120
import org.springframework.hateoas.server.RepresentationModelProcessor;
2221
import org.springframework.util.Assert;
2322

2423
/**
25-
* {@link ResourceProcessor} to add a {@code profile} link to the root resource to point to multiple forms of metadata.
24+
* {@link RepresentationModelProcessor} to add a {@code profile} link to the root resource to point to multiple forms of
25+
* metadata.
2626
*
2727
* @author Oliver Gierke
2828
* @author Greg Turnquist
@@ -39,7 +39,6 @@ public class ProfileResourceProcessor implements RepresentationModelProcessor<Re
3939
*
4040
* @param configuration must not be {@literal null}.
4141
*/
42-
@Autowired
4342
public ProfileResourceProcessor(RepositoryRestConfiguration configuration) {
4443

4544
Assert.notNull(configuration, "RepositoryRestConfiguration must not be null!");

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ public class RepositoryRestHandlerAdapter extends RequestMappingHandlerAdapter {
3737
private final List<HandlerMethodArgumentResolver> argumentResolvers;
3838

3939
/**
40-
* Creates a new {@link RepositoryRestHandlerAdapter} using the given {@link HandlerMethodArgumentResolver} and
41-
* {@link org.springframework.hateoas.server.mvc.ResourceProcessorInvoker}.
40+
* Creates a new {@link RepositoryRestHandlerAdapter} using the given {@link HandlerMethodArgumentResolver}s.
4241
*
4342
* @param argumentResolvers must not be {@literal null}.
44-
* @param invoker must not be {@literal null}.
4543
*/
4644
public RepositoryRestHandlerAdapter(List<HandlerMethodArgumentResolver> argumentResolvers) {
4745

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616
package org.springframework.data.rest.webmvc;
1717

1818
import org.springframework.hateoas.RepresentationModel;
19+
import org.springframework.hateoas.server.RepresentationModelProcessor;
1920
import org.springframework.util.Assert;
2021

2122
import com.fasterxml.jackson.annotation.JsonIgnore;
2223

2324
/**
24-
* A custom {@link ResourceSupport} type to be able to write custom {@link ResourceProcessor}s to add additional links
25-
* to ones automatically exposed for Spring Data repository query methods.
25+
* A custom {@link RepresentationModel} type to be able to write custom {@link RepresentationModelProcessor}s to add
26+
* additional links to ones automatically exposed for Spring Data repository query methods.
2627
*
2728
* @author Oliver Gierke
2829
*/

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

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import java.util.Set;
2626
import java.util.stream.Collectors;
2727

28+
import javax.servlet.http.HttpServletRequest;
29+
2830
import org.springframework.beans.factory.BeanClassLoaderAware;
2931
import org.springframework.beans.factory.BeanFactoryUtils;
3032
import org.springframework.beans.factory.ObjectFactory;
@@ -114,6 +116,7 @@
114116
import org.springframework.http.MediaType;
115117
import org.springframework.http.converter.HttpMessageConverter;
116118
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
119+
import org.springframework.http.server.ServerHttpRequest;
117120
import org.springframework.plugin.core.PluginRegistry;
118121
import org.springframework.util.ClassUtils;
119122
import org.springframework.web.bind.support.ConfigurableWebBindingInitializer;
@@ -136,7 +139,7 @@
136139
/**
137140
* Main application configuration for Spring Data REST. To customize how the exporter works, subclass this and override
138141
* any of the {@literal configure*} methods.
139-
* <p/>
142+
* <p>
140143
* Any XML files located in the classpath under the {@literal META-INF/spring-data-rest/} path will be automatically
141144
* found and loaded into this {@link org.springframework.context.ApplicationContext}.
142145
*
@@ -388,20 +391,13 @@ public BaseUri baseUri(RepositoryRestConfiguration repositoryRestConfiguration)
388391
return new BaseUri(repositoryRestConfiguration.getBasePath());
389392
}
390393

391-
/**
392-
* {@link org.springframework.beans.factory.config.BeanPostProcessor} to turn beans annotated as
393-
* {@link org.springframework.data.rest.repository.annotation.RepositoryEventHandler}s.
394-
*
395-
* @return
396-
*/
397394
@Bean
398395
public static AnnotatedEventHandlerInvoker annotatedEventHandlerInvoker() {
399396
return new AnnotatedEventHandlerInvoker();
400397
}
401398

402399
/**
403-
* Turns an {@link javax.servlet.http.HttpServletRequest} into a
404-
* {@link org.springframework.http.server.ServerHttpRequest}.
400+
* Turns an {@link HttpServletRequest} into a {@link ServerHttpRequest}.
405401
*
406402
* @return
407403
*/
@@ -459,7 +455,6 @@ public ETagArgumentResolver eTagArgumentResolver() {
459455
* configuration into account when generating links.
460456
*
461457
* @return
462-
* @throws Exception
463458
*/
464459
@Bean
465460
public RepositoryEntityLinks entityLinks(ObjectFactory<HateoasPageableHandlerMethodArgumentResolver> pageableResolver, //
@@ -640,7 +635,6 @@ public UriListHttpMessageConverter uriListHttpMessageConverter() {
640635
* Special {@link org.springframework.web.servlet.HandlerAdapter} that only recognizes handler methods defined in the
641636
* provided controller classes.
642637
*
643-
* @param resourceProcessors {@link ResourceProcessor}s available in the {@link ApplicationContext}.
644638
* @return
645639
*/
646640
@Bean

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@
1919
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
2020

2121
/**
22-
* SPI to be able to register extensions that add static resource routes.
22+
* SPI to be able to register extensions that add static resource routes. See
23+
* {@code org.springframework.data.rest.webmvc.halexplorer.HalExplorerConfiguration} in the HAL Explorer module.
2324
*
2425
* @author Oliver Drotbohm
2526
* @since 3.2
26-
* @see org.springframework.data.rest.webmvc.halbrowser.HalBrowserConfiguration
27-
* @see org.springframework.data.rest.webmvc.halexplorer.HalExplorerConfiguration
2827
*/
2928
public interface StaticResourceProvider {
3029

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
import org.springframework.http.converter.HttpMessageNotWritableException;
3737

3838
/**
39-
* {@link Converter} to render all {@link Link}s contained in a {@link ResourceSupport} as {@code text/uri-list} and
40-
* parse a request of that media type back into a {@link ResourceSupport} instance.
39+
* {@link Converter} to render all {@link Link}s contained in a {@link RepresentationModel} as {@code text/uri-list} and
40+
* parse a request of that media type back into a {@link RepresentationModel} instance.
4141
*
4242
* @author Jon Brisbin
4343
* @author Greg Turnquist

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public PersistentEntityJackson2Module(Associations associations, PersistentEntit
146146

147147
/**
148148
* Custom {@link JsonSerializer} for {@link PersistentEntityResource}s to turn associations into {@link Link}s.
149-
* Delegates to standard {@link Resource} serialization afterwards.
149+
* Delegates to standard {@link EntityModel} serialization afterwards.
150150
*
151151
* @author Oliver Gierke
152152
*/
@@ -331,7 +331,7 @@ private Optional<? extends PersistentProperty<?>> findProperty(String finalName,
331331
}
332332

333333
/**
334-
* Serializer to wrap values into an {@link Resource} instance and collecting all association links.
334+
* Serializer to wrap values into an {@link EntityModel} instance and collecting all association links.
335335
*
336336
* @author Oliver Gierke
337337
* @author Alex Leigh

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ public class PersistentEntityToJsonSchemaConverter implements ConditionalGeneric
8787
* {@link ResourceMappings}.
8888
*
8989
* @param entities must not be {@literal null}.
90-
* @param mappings must not be {@literal null}.
90+
* @param associations must not be {@literal null}.
9191
* @param resolver must not be {@literal null}.
9292
* @param objectMapper must not be {@literal null}.
9393
* @param configuration must not be {@literal null}.
94+
* @param customizerFactory must not be {@literal null}.
9495
*/
9596
public PersistentEntityToJsonSchemaConverter(PersistentEntities entities, Associations associations,
9697
MessageResolver resolver, ObjectMapper objectMapper, RepositoryRestConfiguration configuration,
@@ -101,6 +102,7 @@ public PersistentEntityToJsonSchemaConverter(PersistentEntities entities, Associ
101102
Assert.notNull(resolver, "MessageResolver must not be null!");
102103
Assert.notNull(objectMapper, "ObjectMapper must not be null!");
103104
Assert.notNull(configuration, "RepositoryRestConfiguration must not be null!");
105+
Assert.notNull(customizerFactory, "ValueTypeSchemaPropertyCustomizerFactory must not be null!");
104106

105107
this.entities = entities;
106108
this.associations = associations;

spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/patch/PatchOperation.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ protected PatchOperation(String op, UntypedSpelPath path, Object value) {
5656
*
5757
* @param targetObject the target object, used as assistance in determining the evaluated object's type.
5858
* @param entityType the entityType
59-
* @param <T> the entity type
6059
* @return the result of late-value evaluation if the value is a {@link LateObjectEvaluator}; the value itself
6160
* otherwise.
6261
*/

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
1716
package org.springframework.data.rest.webmvc.support;
1817

1918
import static org.springframework.http.HttpHeaders.*;
@@ -27,7 +26,7 @@
2726
import org.springframework.web.method.support.ModelAndViewContainer;
2827

2928
/**
30-
* {@link HandlerMethodArgumentResolver} to resolve If-Match headers for optimistic locking handling {@link IfMatch}.
29+
* {@link HandlerMethodArgumentResolver} to resolve If-Match headers for optimistic locking handling {@link ETag}.
3130
*
3231
* @author Pablo Lozano
3332
* @author Oliver Gierke

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
public interface ExcerptProjector {
2525

2626
/**
27-
* Creates a excerpt projection for the given source. If no excerpt projection is available, the call will fall back
28-
* to the behavior of {@link #project(Object)}. If you completely wish to skip handling the object, check for the
29-
* presence of an excerpt projection using {@link #hasExcerptProjection(Class)}.
27+
* Creates a excerpt projection for the given source. If no excerpt projection is available, the object will be
28+
* returned as is. If you completely wish to skip handling the object, check for the presence of an excerpt projection
29+
* using {@link #hasExcerptProjection(Class)}.
3030
*
3131
* @param source must not be {@literal null}.
3232
* @return

0 commit comments

Comments
 (0)