Polishing

(cherry picked from commit d2cc97a)
This commit is contained in:
Juergen Hoeller
2017-02-21 22:41:40 +01:00
parent ba0484fcac
commit 34a0857628
7 changed files with 60 additions and 51 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 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.
@@ -103,8 +103,6 @@ public class CorsConfiguration {
/**
Set<String> combined = new LinkedHashSet<String>(source);
return new ArrayList<String>(combined);
* Set the origins to allow, e.g. {@code "http://domain1.com"}.
* <p>The special value {@code "*"} allows all domains.
* <p>By default this is not set.
@@ -114,7 +112,7 @@ public class CorsConfiguration {
}
/**
* Return the configured origins to allow, possibly {@code null}.
* Return the configured origins to allow, or {@code null} if none.
* @see #addAllowedOrigin(String)
* @see #setAllowedOrigins(List)
*/
@@ -157,7 +155,7 @@ public class CorsConfiguration {
}
/**
* Return the allowed HTTP methods, possibly {@code null} in which case
* Return the allowed HTTP methods, or {@code null} in which case
* only {@code "GET"} and {@code "HEAD"} allowed.
* @see #addAllowedMethod(HttpMethod)
* @see #addAllowedMethod(String)
@@ -210,7 +208,7 @@ public class CorsConfiguration {
}
/**
* Return the allowed actual request headers, possibly {@code null}.
* Return the allowed actual request headers, or {@code null} if none.
* @see #addAllowedHeader(String)
* @see #setAllowedHeaders(List)
*/
@@ -244,7 +242,7 @@ public class CorsConfiguration {
}
/**
* Return the configured response headers to expose, possibly {@code null}.
* Return the configured response headers to expose, or {@code null} if none.
* @see #addExposedHeader(String)
* @see #setExposedHeaders(List)
*/
@@ -275,7 +273,7 @@ public class CorsConfiguration {
}
/**
* Return the configured {@code allowCredentials} flag, possibly {@code null}.
* Return the configured {@code allowCredentials} flag, or {@code null} if none.
* @see #setAllowCredentials(Boolean)
*/
public Boolean getAllowCredentials() {
@@ -292,7 +290,7 @@ public class CorsConfiguration {
}
/**
* Return the configured {@code maxAge} value, possibly {@code null}.
* Return the configured {@code maxAge} value, or {@code null} if none.
* @see #setMaxAge(Long)
*/
public Long getMaxAge() {
@@ -380,7 +378,7 @@ public class CorsConfiguration {
/**
* Check the origin of the request against the configured allowed origins.
* @param requestOrigin the origin to check
* @return the origin to use for the response, possibly {@code null} which
* @return the origin to use for the response, or {@code null} which
* means the request origin is not allowed
*/
public String checkOrigin(String requestOrigin) {