SEC-2230: Polish scoping and finals
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
|
||||
* @author Rob Winch
|
||||
* @since 3.2
|
||||
*/
|
||||
public class DelegatingRequestMatcherHeaderWriter implements HeaderWriter {
|
||||
public final class DelegatingRequestMatcherHeaderWriter implements HeaderWriter {
|
||||
private final RequestMatcher requestMatcher;
|
||||
|
||||
private final HeaderWriter delegateHeaderWriter;
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
* @author Marten Deinum
|
||||
* @since 3.2
|
||||
*/
|
||||
public abstract class AbstractRequestParameterAllowFromStrategy implements AllowFromStrategy {
|
||||
abstract class AbstractRequestParameterAllowFromStrategy implements AllowFromStrategy {
|
||||
|
||||
private static final String DEFAULT_ORIGIN_REQUEST_PARAMETER = "x-frames-allow-from";
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import java.util.regex.Pattern;
|
||||
* @author Marten Deinum
|
||||
* @since 3.2
|
||||
*/
|
||||
public class RegExpAllowFromStrategy extends AbstractRequestParameterAllowFromStrategy {
|
||||
public final class RegExpAllowFromStrategy extends AbstractRequestParameterAllowFromStrategy {
|
||||
|
||||
private final Pattern pattern;
|
||||
|
||||
|
||||
+2
-2
@@ -6,12 +6,12 @@ import java.net.URI;
|
||||
/**
|
||||
* Simple implementation of the {@code AllowFromStrategy}
|
||||
*/
|
||||
public class StaticAllowFromStrategy implements AllowFromStrategy {
|
||||
public final class StaticAllowFromStrategy implements AllowFromStrategy {
|
||||
|
||||
private final URI uri;
|
||||
|
||||
public StaticAllowFromStrategy(URI uri) {
|
||||
this.uri=uri;
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
public String getAllowFromValue(HttpServletRequest request) {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import org.springframework.util.Assert;
|
||||
* @author Marten Deinum
|
||||
* @since 3.2
|
||||
*/
|
||||
public class WhiteListedAllowFromStrategy extends AbstractRequestParameterAllowFromStrategy {
|
||||
public final class WhiteListedAllowFromStrategy extends AbstractRequestParameterAllowFromStrategy {
|
||||
|
||||
private final Collection<String> allowed;
|
||||
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
*
|
||||
* @see AllowFromStrategy
|
||||
*/
|
||||
public class XFrameOptionsHeaderWriter implements HeaderWriter {
|
||||
public final class XFrameOptionsHeaderWriter implements HeaderWriter {
|
||||
|
||||
public static final String XFRAME_OPTIONS_HEADER = "X-Frame-Options";
|
||||
|
||||
@@ -110,7 +110,7 @@ public class XFrameOptionsHeaderWriter implements HeaderWriter {
|
||||
*
|
||||
* @return the mode for the X-Frame-Options header value.
|
||||
*/
|
||||
public String getMode() {
|
||||
private String getMode() {
|
||||
return mode;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user