From d04cf5ea689eb1ce1708e8e9e86cd30eeee46823 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Fri, 7 Dec 2012 09:27:15 -0600 Subject: [PATCH] Remove unused FilterInvocation.DummyResponse --- .../security/web/FilterInvocation.java | 152 ------------------ 1 file changed, 152 deletions(-) diff --git a/web/src/main/java/org/springframework/security/web/FilterInvocation.java b/web/src/main/java/org/springframework/security/web/FilterInvocation.java index 25ae794f29..2499ba7c22 100644 --- a/web/src/main/java/org/springframework/security/web/FilterInvocation.java +++ b/web/src/main/java/org/springframework/security/web/FilterInvocation.java @@ -17,19 +17,14 @@ package org.springframework.security.web; import java.io.IOException; -import java.io.PrintWriter; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; -import java.util.Collection; -import java.util.Locale; import javax.servlet.FilterChain; import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; -import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletResponse; @@ -210,153 +205,6 @@ class DummyRequest extends HttpServletRequestWrapper { } } -class DummyResponse implements HttpServletResponse { - public void addCookie(Cookie cookie) { - throw new UnsupportedOperationException(); - } - - public void addDateHeader(String name, long date) { - throw new UnsupportedOperationException(); - } - - public void addHeader(String name, String value) { - throw new UnsupportedOperationException(); - } - - public void addIntHeader(String name, int value) { - throw new UnsupportedOperationException(); - } - - public boolean containsHeader(String name) { - throw new UnsupportedOperationException(); - } - - public String encodeRedirectURL(String url) { - throw new UnsupportedOperationException(); - } - - public String encodeRedirectUrl(String url) { - throw new UnsupportedOperationException(); - } - - public String encodeURL(String url) { - throw new UnsupportedOperationException(); - } - - public String encodeUrl(String url) { - throw new UnsupportedOperationException(); - } - - public void sendError(int sc) throws IOException { - throw new UnsupportedOperationException(); - - } - - public void sendError(int sc, String msg) throws IOException { - throw new UnsupportedOperationException(); - } - - public void sendRedirect(String location) throws IOException { - throw new UnsupportedOperationException(); - } - - public void setDateHeader(String name, long date) { - throw new UnsupportedOperationException(); - } - - public void setHeader(String name, String value) { - throw new UnsupportedOperationException(); - } - - public void setIntHeader(String name, int value) { - throw new UnsupportedOperationException(); - } - - public void setStatus(int sc) { - throw new UnsupportedOperationException(); - } - - public void setStatus(int sc, String sm) { - throw new UnsupportedOperationException(); - } - - public void flushBuffer() throws IOException { - throw new UnsupportedOperationException(); - } - - public int getBufferSize() { - throw new UnsupportedOperationException(); - } - - public String getCharacterEncoding() { - throw new UnsupportedOperationException(); - } - - public String getContentType() { - throw new UnsupportedOperationException(); - } - - public Locale getLocale() { - throw new UnsupportedOperationException(); - } - - public ServletOutputStream getOutputStream() throws IOException { - throw new UnsupportedOperationException(); - } - - public PrintWriter getWriter() throws IOException { - throw new UnsupportedOperationException(); - } - - public boolean isCommitted() { - throw new UnsupportedOperationException(); - } - - public void reset() { - throw new UnsupportedOperationException(); - } - - public void resetBuffer() { - throw new UnsupportedOperationException(); - } - - public void setBufferSize(int size) { - throw new UnsupportedOperationException(); - } - - public void setCharacterEncoding(String charset) { - throw new UnsupportedOperationException(); - } - - public void setContentLength(int len) { - throw new UnsupportedOperationException(); - } - - public void setContentType(String type) { - throw new UnsupportedOperationException(); - } - - public void setLocale(Locale loc) { - throw new UnsupportedOperationException(); - } - - public int getStatus() { - throw new UnsupportedOperationException(); - } - - public String getHeader(String name) { - throw new UnsupportedOperationException(); - } - - public Collection getHeaders(String name) { - throw new UnsupportedOperationException(); - } - - public Collection getHeaderNames() { - throw new UnsupportedOperationException(); - } -} - final class UnsupportedOperationExceptionInvocationHandler implements InvocationHandler { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { throw new UnsupportedOperationException(method + " is not supported");