1
0
mirror of synced 2026-08-05 09:47:05 +00:00

SEC-2230: Polish scoping and finals

This commit is contained in:
Rob Winch
2013-07-31 10:43:36 -05:00
parent a1bf28a697
commit 94a73fee37
7 changed files with 14 additions and 20 deletions
@@ -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;
@@ -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";
@@ -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;
@@ -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) {
@@ -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;
@@ -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;
}
}