Skip to content

Commit a06ab6d

Browse files
committed
Polishing
1 parent a98e3f0 commit a06ab6d

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/support/AutowireUtils.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ else if (arg instanceof TypedStringValue) {
300300
* {@link Qualifier @Qualifier}, or {@link Value @Value}.
301301
* <p>Note that {@link #resolveDependency} may still be able to resolve the
302302
* dependency for the supplied parameter even if this method returns {@code false}.
303-
* @param parameter the parameter whose dependency should be autowired (must not be
304-
* {@code null})
303+
* @param parameter the parameter whose dependency should be autowired
304+
* (must not be {@code null})
305305
* @param parameterIndex the index of the parameter in the constructor or method
306306
* that declares the parameter
307307
* @since 5.2
@@ -397,8 +397,9 @@ private static AnnotatedElement getEffectiveAnnotatedParameter(Parameter paramet
397397
return parameter;
398398
}
399399

400+
400401
/**
401-
* Reflective InvocationHandler for lazy access to the current target object.
402+
* Reflective {@link InvocationHandler} for lazy access to the current target object.
402403
*/
403404
@SuppressWarnings("serial")
404405
private static class ObjectFactoryDelegatingInvocationHandler implements InvocationHandler, Serializable {

spring-web/src/main/java/org/springframework/http/CacheControl.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -52,7 +52,7 @@
5252
public class CacheControl {
5353

5454
@Nullable
55-
private Duration maxAge = null;
55+
private Duration maxAge;
5656

5757
private boolean noCache = false;
5858

@@ -69,13 +69,13 @@ public class CacheControl {
6969
private boolean proxyRevalidate = false;
7070

7171
@Nullable
72-
private Duration staleWhileRevalidate = null;
72+
private Duration staleWhileRevalidate;
7373

7474
@Nullable
75-
private Duration staleIfError = null;
75+
private Duration staleIfError;
7676

7777
@Nullable
78-
private Duration sMaxAge = null;
78+
private Duration sMaxAge;
7979

8080
/**
8181
* Create an empty CacheControl instance.
@@ -107,6 +107,7 @@ public static CacheControl empty() {
107107
* @param maxAge the maximum time the response should be cached
108108
* @param unit the time unit of the {@code maxAge} argument
109109
* @return {@code this}, to facilitate method chaining
110+
* @see #maxAge(Duration)
110111
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.8">rfc7234 section 5.2.2.8</a>
111112
*/
112113
public static CacheControl maxAge(long maxAge, TimeUnit unit) {
@@ -124,6 +125,7 @@ public static CacheControl maxAge(long maxAge, TimeUnit unit) {
124125
* directive should be set ({@link #mustRevalidate()}
125126
* @param maxAge the maximum time the response should be cached
126127
* @return {@code this}, to facilitate method chaining
128+
* @since 5.2
127129
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.8">rfc7234 section 5.2.2.8</a>
128130
*/
129131
public static CacheControl maxAge(Duration maxAge) {
@@ -234,6 +236,7 @@ public CacheControl proxyRevalidate() {
234236
* @param sMaxAge the maximum time the response should be cached
235237
* @param unit the time unit of the {@code sMaxAge} argument
236238
* @return {@code this}, to facilitate method chaining
239+
* @see #sMaxAge(Duration)
237240
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.9">rfc7234 section 5.2.2.9</a>
238241
*/
239242
public CacheControl sMaxAge(long sMaxAge, TimeUnit unit) {
@@ -246,6 +249,7 @@ public CacheControl sMaxAge(long sMaxAge, TimeUnit unit) {
246249
* by this directive overrides the maximum age specified by other directives.
247250
* @param sMaxAge the maximum time the response should be cached
248251
* @return {@code this}, to facilitate method chaining
252+
* @since 5.2
249253
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.9">rfc7234 section 5.2.2.9</a>
250254
*/
251255
public CacheControl sMaxAge(Duration sMaxAge) {
@@ -263,6 +267,7 @@ public CacheControl sMaxAge(Duration sMaxAge) {
263267
* @param staleWhileRevalidate the maximum time the response should be used while being revalidated
264268
* @param unit the time unit of the {@code staleWhileRevalidate} argument
265269
* @return {@code this}, to facilitate method chaining
270+
* @see #staleWhileRevalidate(Duration)
266271
* @see <a href="https://tools.ietf.org/html/rfc5861#section-3">rfc5861 section 3</a>
267272
*/
268273
public CacheControl staleWhileRevalidate(long staleWhileRevalidate, TimeUnit unit) {
@@ -278,6 +283,7 @@ public CacheControl staleWhileRevalidate(long staleWhileRevalidate, TimeUnit uni
278283
* (i.e. without blocking).
279284
* @param staleWhileRevalidate the maximum time the response should be used while being revalidated
280285
* @return {@code this}, to facilitate method chaining
286+
* @since 5.2
281287
* @see <a href="https://tools.ietf.org/html/rfc5861#section-3">rfc5861 section 3</a>
282288
*/
283289
public CacheControl staleWhileRevalidate(Duration staleWhileRevalidate) {
@@ -292,6 +298,7 @@ public CacheControl staleWhileRevalidate(Duration staleWhileRevalidate) {
292298
* @param staleIfError the maximum time the response should be used when errors are encountered
293299
* @param unit the time unit of the {@code staleIfError} argument
294300
* @return {@code this}, to facilitate method chaining
301+
* @see #staleIfError(Duration)
295302
* @see <a href="https://tools.ietf.org/html/rfc5861#section-4">rfc5861 section 4</a>
296303
*/
297304
public CacheControl staleIfError(long staleIfError, TimeUnit unit) {
@@ -304,6 +311,7 @@ public CacheControl staleIfError(long staleIfError, TimeUnit unit) {
304311
* MAY be used to satisfy the request, regardless of other freshness information.
305312
* @param staleIfError the maximum time the response should be used when errors are encountered
306313
* @return {@code this}, to facilitate method chaining
314+
* @since 5.2
307315
* @see <a href="https://tools.ietf.org/html/rfc5861#section-4">rfc5861 section 4</a>
308316
*/
309317
public CacheControl staleIfError(Duration staleIfError) {

0 commit comments

Comments
 (0)