Skip to content

Commit af6a2c3

Browse files
committed
Polish Javadoc to prepare builds with JDK 17.
Issue #2068.
1 parent f60e941 commit af6a2c3

22 files changed

+44
-52
lines changed

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

+1-1
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

+1-1
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

+3-4
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("");
@@ -370,7 +369,7 @@ public boolean returnBodyOnUpdate(String acceptHeader) {
370369
/**
371370
* Set whether to return a response body after updating an entity.
372371
*
373-
* @param returnBody can be {@literal null}, expressing the decision shall be derived from the presence of an
372+
* @param returnBodyOnUpdate can be {@literal null}, expressing the decision shall be derived from the presence of an
374373
* {@code Accept} header in the request.
375374
* @return {@literal this}
376375
*/
@@ -538,7 +537,7 @@ public MetadataConfiguration getMetadataConfiguration() {
538537
/**
539538
* Configures whether to enable enum value translation via the Spring Data REST default resource bundle. Defaults to
540539
* {@literal false} for backwards compatibility reasons. Will use the fully qualified enum name as key. For further
541-
* details see {@link EnumTranslator}.
540+
* details see {code EnumTranslator}.
542541
*
543542
* @param enableEnumTranslation
544543
* @see #getEnumTranslationConfiguration()
@@ -695,7 +694,7 @@ public LinkRelationProvider getRelProvider() {
695694
}
696695

697696
/**
698-
* The {@link RelProvider} to be used to calculate the link relation defaults for repositories.
697+
* The {@link LinkRelationProvider} to be used to calculate the link relation defaults for repositories.
699698
*/
700699
public void setRelProvider(LinkRelationProvider relProvider) {
701700

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

+1-1
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

+3-1
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

+1-2
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

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static <R extends RepresentationModel<?>> ResponseEntity<RepresentationMo
5252
}
5353

5454
/**
55-
* Wrap a resource as a {@link ResourceEntity} and attach given headers and status.
55+
* Wrap a resource as a {@link ResponseEntity} and attach given headers and status.
5656
*
5757
* @param status
5858
* @param headers

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

+2-2
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

+5-3
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

+1-1
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

+2-3
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

+1-3
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

+3-2
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

+5-12
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import java.util.Optional;
2525
import java.util.Set;
2626

27+
import javax.servlet.http.HttpServletRequest;
28+
2729
import org.springframework.beans.factory.BeanClassLoaderAware;
2830
import org.springframework.beans.factory.BeanFactoryUtils;
2931
import org.springframework.beans.factory.ObjectFactory;
@@ -112,6 +114,7 @@
112114
import org.springframework.http.MediaType;
113115
import org.springframework.http.converter.HttpMessageConverter;
114116
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
117+
import org.springframework.http.server.ServerHttpRequest;
115118
import org.springframework.plugin.core.PluginRegistry;
116119
import org.springframework.util.ClassUtils;
117120
import org.springframework.web.bind.support.ConfigurableWebBindingInitializer;
@@ -120,7 +123,6 @@
120123
import org.springframework.web.servlet.HandlerExceptionResolver;
121124
import org.springframework.web.servlet.HandlerMapping;
122125
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
123-
import org.springframework.web.servlet.handler.AbstractHandlerMapping;
124126
import org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver;
125127
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
126128
import org.springframework.web.util.pattern.PathPatternParser;
@@ -134,7 +136,7 @@
134136
/**
135137
* Main application configuration for Spring Data REST. To customize how the exporter works, subclass this and override
136138
* any of the {@literal configure*} methods.
137-
* <p/>
139+
* <p>
138140
* Any XML files located in the classpath under the {@literal META-INF/spring-data-rest/} path will be automatically
139141
* found and loaded into this {@link org.springframework.context.ApplicationContext}.
140142
*
@@ -384,20 +386,13 @@ public BaseUri baseUri(RepositoryRestConfiguration repositoryRestConfiguration)
384386
return new BaseUri(repositoryRestConfiguration.getBasePath());
385387
}
386388

387-
/**
388-
* {@link org.springframework.beans.factory.config.BeanPostProcessor} to turn beans annotated as
389-
* {@link org.springframework.data.rest.repository.annotation.RepositoryEventHandler}s.
390-
*
391-
* @return
392-
*/
393389
@Bean
394390
public static AnnotatedEventHandlerInvoker annotatedEventHandlerInvoker() {
395391
return new AnnotatedEventHandlerInvoker();
396392
}
397393

398394
/**
399-
* Turns an {@link javax.servlet.http.HttpServletRequest} into a
400-
* {@link org.springframework.http.server.ServerHttpRequest}.
395+
* Turns an {@link HttpServletRequest} into a {@link ServerHttpRequest}.
401396
*
402397
* @return
403398
*/
@@ -455,7 +450,6 @@ public ETagArgumentResolver eTagArgumentResolver() {
455450
* configuration into account when generating links.
456451
*
457452
* @return
458-
* @throws Exception
459453
*/
460454
@Bean
461455
public RepositoryEntityLinks entityLinks(ObjectFactory<HateoasPageableHandlerMethodArgumentResolver> pageableResolver, //
@@ -604,7 +598,6 @@ public UriListHttpMessageConverter uriListHttpMessageConverter() {
604598
* Special {@link org.springframework.web.servlet.HandlerAdapter} that only recognizes handler methods defined in the
605599
* provided controller classes.
606600
*
607-
* @param resourceProcessors {@link ResourceProcessor}s available in the {@link ApplicationContext}.
608601
* @return
609602
*/
610603
@Bean

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

+2-3
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

+2-2
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

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public PersistentEntityJackson2Module(Associations associations, PersistentEntit
145145

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

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

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

+3-1
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

-1
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

+1-2
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

+3-3
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)