Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Mar 8, 2019
1 parent a98e3f0 commit a06ab6d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ else if (arg instanceof TypedStringValue) {
* {@link Qualifier @Qualifier}, or {@link Value @Value}.
* <p>Note that {@link #resolveDependency} may still be able to resolve the
* dependency for the supplied parameter even if this method returns {@code false}.
* @param parameter the parameter whose dependency should be autowired (must not be
* {@code null})
* @param parameter the parameter whose dependency should be autowired
* (must not be {@code null})
* @param parameterIndex the index of the parameter in the constructor or method
* that declares the parameter
* @since 5.2
Expand Down Expand Up @@ -397,8 +397,9 @@ private static AnnotatedElement getEffectiveAnnotatedParameter(Parameter paramet
return parameter;
}


/**
* Reflective InvocationHandler for lazy access to the current target object.
* Reflective {@link InvocationHandler} for lazy access to the current target object.
*/
@SuppressWarnings("serial")
private static class ObjectFactoryDelegatingInvocationHandler implements InvocationHandler, Serializable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -52,7 +52,7 @@
public class CacheControl {

@Nullable
private Duration maxAge = null;
private Duration maxAge;

private boolean noCache = false;

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

@Nullable
private Duration staleWhileRevalidate = null;
private Duration staleWhileRevalidate;

@Nullable
private Duration staleIfError = null;
private Duration staleIfError;

@Nullable
private Duration sMaxAge = null;
private Duration sMaxAge;

/**
* Create an empty CacheControl instance.
Expand Down Expand Up @@ -107,6 +107,7 @@ public static CacheControl empty() {
* @param maxAge the maximum time the response should be cached
* @param unit the time unit of the {@code maxAge} argument
* @return {@code this}, to facilitate method chaining
* @see #maxAge(Duration)
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.8">rfc7234 section 5.2.2.8</a>
*/
public static CacheControl maxAge(long maxAge, TimeUnit unit) {
Expand All @@ -124,6 +125,7 @@ public static CacheControl maxAge(long maxAge, TimeUnit unit) {
* directive should be set ({@link #mustRevalidate()}
* @param maxAge the maximum time the response should be cached
* @return {@code this}, to facilitate method chaining
* @since 5.2
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.8">rfc7234 section 5.2.2.8</a>
*/
public static CacheControl maxAge(Duration maxAge) {
Expand Down Expand Up @@ -234,6 +236,7 @@ public CacheControl proxyRevalidate() {
* @param sMaxAge the maximum time the response should be cached
* @param unit the time unit of the {@code sMaxAge} argument
* @return {@code this}, to facilitate method chaining
* @see #sMaxAge(Duration)
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.9">rfc7234 section 5.2.2.9</a>
*/
public CacheControl sMaxAge(long sMaxAge, TimeUnit unit) {
Expand All @@ -246,6 +249,7 @@ public CacheControl sMaxAge(long sMaxAge, TimeUnit unit) {
* by this directive overrides the maximum age specified by other directives.
* @param sMaxAge the maximum time the response should be cached
* @return {@code this}, to facilitate method chaining
* @since 5.2
* @see <a href="https://tools.ietf.org/html/rfc7234#section-5.2.2.9">rfc7234 section 5.2.2.9</a>
*/
public CacheControl sMaxAge(Duration sMaxAge) {
Expand All @@ -263,6 +267,7 @@ public CacheControl sMaxAge(Duration sMaxAge) {
* @param staleWhileRevalidate the maximum time the response should be used while being revalidated
* @param unit the time unit of the {@code staleWhileRevalidate} argument
* @return {@code this}, to facilitate method chaining
* @see #staleWhileRevalidate(Duration)
* @see <a href="https://tools.ietf.org/html/rfc5861#section-3">rfc5861 section 3</a>
*/
public CacheControl staleWhileRevalidate(long staleWhileRevalidate, TimeUnit unit) {
Expand All @@ -278,6 +283,7 @@ public CacheControl staleWhileRevalidate(long staleWhileRevalidate, TimeUnit uni
* (i.e. without blocking).
* @param staleWhileRevalidate the maximum time the response should be used while being revalidated
* @return {@code this}, to facilitate method chaining
* @since 5.2
* @see <a href="https://tools.ietf.org/html/rfc5861#section-3">rfc5861 section 3</a>
*/
public CacheControl staleWhileRevalidate(Duration staleWhileRevalidate) {
Expand All @@ -292,6 +298,7 @@ public CacheControl staleWhileRevalidate(Duration staleWhileRevalidate) {
* @param staleIfError the maximum time the response should be used when errors are encountered
* @param unit the time unit of the {@code staleIfError} argument
* @return {@code this}, to facilitate method chaining
* @see #staleIfError(Duration)
* @see <a href="https://tools.ietf.org/html/rfc5861#section-4">rfc5861 section 4</a>
*/
public CacheControl staleIfError(long staleIfError, TimeUnit unit) {
Expand All @@ -304,6 +311,7 @@ public CacheControl staleIfError(long staleIfError, TimeUnit unit) {
* MAY be used to satisfy the request, regardless of other freshness information.
* @param staleIfError the maximum time the response should be used when errors are encountered
* @return {@code this}, to facilitate method chaining
* @since 5.2
* @see <a href="https://tools.ietf.org/html/rfc5861#section-4">rfc5861 section 4</a>
*/
public CacheControl staleIfError(Duration staleIfError) {
Expand Down

0 comments on commit a06ab6d

Please sign in to comment.