| 1 |
|
package com.atlassian.security.auth.trustedapps.filter; |
| 2 |
|
|
| 3 |
|
import java.io.BufferedReader; |
| 4 |
|
import java.io.IOException; |
| 5 |
|
import java.io.UnsupportedEncodingException; |
| 6 |
|
import java.security.Principal; |
| 7 |
|
import java.util.Enumeration; |
| 8 |
|
import java.util.Locale; |
| 9 |
|
import java.util.Map; |
| 10 |
|
|
| 11 |
|
import javax.servlet.RequestDispatcher; |
| 12 |
|
import javax.servlet.ServletInputStream; |
| 13 |
|
import javax.servlet.http.Cookie; |
| 14 |
|
import javax.servlet.http.HttpServletRequest; |
| 15 |
|
import javax.servlet.http.HttpSession; |
| 16 |
|
|
|
|
|
| 7.8% |
Uncovered Elements: 94 (102) |
Complexity: 51 |
Complexity Density: 1 |
|
| 17 |
|
public class ImmutableRequest |
| 18 |
|
{ |
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 19 |
13
|
static HttpServletRequest wrap(final HttpServletRequest delegate)... |
| 20 |
|
{ |
| 21 |
13
|
return new HttpServletRequest() |
| 22 |
|
{ |
| 23 |
|
final HttpServletRequest request = delegate; |
| 24 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 25 |
0
|
public Object getAttribute(String arg0)... |
| 26 |
|
{ |
| 27 |
0
|
return request.getAttribute(arg0); |
| 28 |
|
} |
| 29 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 30 |
0
|
public Enumeration getAttributeNames()... |
| 31 |
|
{ |
| 32 |
0
|
return request.getAttributeNames(); |
| 33 |
|
} |
| 34 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 35 |
0
|
public String getAuthType()... |
| 36 |
|
{ |
| 37 |
0
|
return request.getAuthType(); |
| 38 |
|
} |
| 39 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 40 |
0
|
public String getCharacterEncoding()... |
| 41 |
|
{ |
| 42 |
0
|
return request.getCharacterEncoding(); |
| 43 |
|
} |
| 44 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 45 |
0
|
public int getContentLength()... |
| 46 |
|
{ |
| 47 |
0
|
return request.getContentLength(); |
| 48 |
|
} |
| 49 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 50 |
0
|
public String getContentType()... |
| 51 |
|
{ |
| 52 |
0
|
return request.getContentType(); |
| 53 |
|
} |
| 54 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 55 |
0
|
public String getContextPath()... |
| 56 |
|
{ |
| 57 |
0
|
return request.getContextPath(); |
| 58 |
|
} |
| 59 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 60 |
0
|
public Cookie[] getCookies()... |
| 61 |
|
{ |
| 62 |
0
|
return request.getCookies(); |
| 63 |
|
} |
| 64 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 65 |
0
|
public long getDateHeader(String arg0)... |
| 66 |
|
{ |
| 67 |
0
|
return request.getDateHeader(arg0); |
| 68 |
|
} |
| 69 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 70 |
81
|
public String getHeader(String arg0)... |
| 71 |
|
{ |
| 72 |
81
|
return request.getHeader(arg0); |
| 73 |
|
} |
| 74 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 75 |
0
|
public Enumeration getHeaderNames()... |
| 76 |
|
{ |
| 77 |
0
|
return request.getHeaderNames(); |
| 78 |
|
} |
| 79 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 80 |
0
|
public Enumeration getHeaders(String arg0)... |
| 81 |
|
{ |
| 82 |
0
|
return request.getHeaders(arg0); |
| 83 |
|
} |
| 84 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 85 |
0
|
public ServletInputStream getInputStream() throws IOException... |
| 86 |
|
{ |
| 87 |
0
|
return request.getInputStream(); |
| 88 |
|
} |
| 89 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 90 |
0
|
public int getIntHeader(String arg0)... |
| 91 |
|
{ |
| 92 |
0
|
return request.getIntHeader(arg0); |
| 93 |
|
} |
| 94 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 95 |
0
|
public Locale getLocale()... |
| 96 |
|
{ |
| 97 |
0
|
return request.getLocale(); |
| 98 |
|
} |
| 99 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 100 |
0
|
public Enumeration getLocales()... |
| 101 |
|
{ |
| 102 |
0
|
return request.getLocales(); |
| 103 |
|
} |
| 104 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 105 |
0
|
public String getMethod()... |
| 106 |
|
{ |
| 107 |
0
|
return request.getMethod(); |
| 108 |
|
} |
| 109 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 110 |
0
|
public String getParameter(String arg0)... |
| 111 |
|
{ |
| 112 |
0
|
return request.getParameter(arg0); |
| 113 |
|
} |
| 114 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 115 |
0
|
public Map getParameterMap()... |
| 116 |
|
{ |
| 117 |
0
|
return request.getParameterMap(); |
| 118 |
|
} |
| 119 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 120 |
0
|
public Enumeration getParameterNames()... |
| 121 |
|
{ |
| 122 |
0
|
return request.getParameterNames(); |
| 123 |
|
} |
| 124 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 125 |
0
|
public String[] getParameterValues(String arg0)... |
| 126 |
|
{ |
| 127 |
0
|
return request.getParameterValues(arg0); |
| 128 |
|
} |
| 129 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 130 |
1
|
public String getPathInfo()... |
| 131 |
|
{ |
| 132 |
1
|
return request.getPathInfo(); |
| 133 |
|
} |
| 134 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 135 |
0
|
public String getPathTranslated()... |
| 136 |
|
{ |
| 137 |
0
|
return request.getPathTranslated(); |
| 138 |
|
} |
| 139 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 140 |
0
|
public String getProtocol()... |
| 141 |
|
{ |
| 142 |
0
|
return request.getProtocol(); |
| 143 |
|
} |
| 144 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 145 |
0
|
public String getQueryString()... |
| 146 |
|
{ |
| 147 |
0
|
return request.getQueryString(); |
| 148 |
|
} |
| 149 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 150 |
0
|
public BufferedReader getReader() throws IOException... |
| 151 |
|
{ |
| 152 |
0
|
return request.getReader(); |
| 153 |
|
} |
| 154 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 155 |
0
|
public String getRealPath(String arg0)... |
| 156 |
|
{ |
| 157 |
0
|
return request.getRealPath(arg0); |
| 158 |
|
} |
| 159 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 160 |
2
|
public String getRemoteAddr()... |
| 161 |
|
{ |
| 162 |
2
|
return request.getRemoteAddr(); |
| 163 |
|
} |
| 164 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 165 |
0
|
public String getRemoteHost()... |
| 166 |
|
{ |
| 167 |
0
|
return request.getRemoteHost(); |
| 168 |
|
} |
| 169 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 170 |
0
|
public String getRemoteUser()... |
| 171 |
|
{ |
| 172 |
0
|
return request.getRemoteUser(); |
| 173 |
|
} |
| 174 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 175 |
0
|
public RequestDispatcher getRequestDispatcher(String arg0)... |
| 176 |
|
{ |
| 177 |
0
|
return request.getRequestDispatcher(arg0); |
| 178 |
|
} |
| 179 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 180 |
0
|
public String getRequestedSessionId()... |
| 181 |
|
{ |
| 182 |
0
|
return request.getRequestedSessionId(); |
| 183 |
|
} |
| 184 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 185 |
0
|
public String getRequestURI()... |
| 186 |
|
{ |
| 187 |
0
|
return request.getRequestURI(); |
| 188 |
|
} |
| 189 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 190 |
0
|
public StringBuffer getRequestURL()... |
| 191 |
|
{ |
| 192 |
0
|
return request.getRequestURL(); |
| 193 |
|
} |
| 194 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 195 |
0
|
public String getScheme()... |
| 196 |
|
{ |
| 197 |
0
|
return request.getScheme(); |
| 198 |
|
} |
| 199 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 200 |
0
|
public String getServerName()... |
| 201 |
|
{ |
| 202 |
0
|
return request.getServerName(); |
| 203 |
|
} |
| 204 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 205 |
0
|
public int getServerPort()... |
| 206 |
|
{ |
| 207 |
0
|
return request.getServerPort(); |
| 208 |
|
} |
| 209 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 210 |
0
|
public String getServletPath()... |
| 211 |
|
{ |
| 212 |
0
|
return request.getServletPath(); |
| 213 |
|
} |
| 214 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 215 |
0
|
public HttpSession getSession()... |
| 216 |
|
{ |
| 217 |
0
|
return request.getSession(); |
| 218 |
|
} |
| 219 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 220 |
0
|
public HttpSession getSession(boolean arg0)... |
| 221 |
|
{ |
| 222 |
0
|
return request.getSession(arg0); |
| 223 |
|
} |
| 224 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 225 |
0
|
public Principal getUserPrincipal()... |
| 226 |
|
{ |
| 227 |
0
|
return request.getUserPrincipal(); |
| 228 |
|
} |
| 229 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 230 |
0
|
public boolean isRequestedSessionIdFromCookie()... |
| 231 |
|
{ |
| 232 |
0
|
return request.isRequestedSessionIdFromCookie(); |
| 233 |
|
} |
| 234 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 235 |
0
|
public boolean isRequestedSessionIdFromUrl()... |
| 236 |
|
{ |
| 237 |
0
|
return request.isRequestedSessionIdFromUrl(); |
| 238 |
|
} |
| 239 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 240 |
0
|
public boolean isRequestedSessionIdFromURL()... |
| 241 |
|
{ |
| 242 |
0
|
return request.isRequestedSessionIdFromURL(); |
| 243 |
|
} |
| 244 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 245 |
0
|
public boolean isRequestedSessionIdValid()... |
| 246 |
|
{ |
| 247 |
0
|
return request.isRequestedSessionIdValid(); |
| 248 |
|
} |
| 249 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 250 |
0
|
public boolean isSecure()... |
| 251 |
|
{ |
| 252 |
0
|
return request.isSecure(); |
| 253 |
|
} |
| 254 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 255 |
0
|
public boolean isUserInRole(String arg0)... |
| 256 |
|
{ |
| 257 |
0
|
return request.isUserInRole(arg0); |
| 258 |
|
} |
| 259 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 260 |
0
|
public void removeAttribute(String arg0)... |
| 261 |
|
{ |
| 262 |
0
|
throw new UnsupportedOperationException(); |
| 263 |
|
} |
| 264 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 265 |
0
|
public void setAttribute(String arg0, Object arg1)... |
| 266 |
|
{ |
| 267 |
0
|
throw new UnsupportedOperationException(); |
| 268 |
|
} |
| 269 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 270 |
0
|
public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException... |
| 271 |
|
{ |
| 272 |
0
|
throw new UnsupportedOperationException(); |
| 273 |
|
} |
| 274 |
|
}; |
| 275 |
|
} |
| 276 |
|
} |