Cleanup redundant type casts
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ public class WebXmlMappableAttributesRetriever implements ResourceLoaderAware,
|
||||
NodeList roles = secRoleElt.getElementsByTagName("role-name");
|
||||
|
||||
if (roles.getLength() > 0) {
|
||||
String roleName = ((Element) roles.item(0)).getTextContent().trim();
|
||||
String roleName = roles.item(0).getTextContent().trim();
|
||||
roleNames.add(roleName);
|
||||
logger.info("Retrieved role-name '" + roleName + "' from web.xml");
|
||||
}
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ public class DigestAuthenticationEntryPoint implements AuthenticationEntryPoint,
|
||||
|
||||
public void commence(HttpServletRequest request, HttpServletResponse response,
|
||||
AuthenticationException authException) throws IOException, ServletException {
|
||||
HttpServletResponse httpResponse = (HttpServletResponse) response;
|
||||
HttpServletResponse httpResponse = response;
|
||||
|
||||
// compute a nonce (do not use remote IP address due to proxy farms)
|
||||
// format of nonce is:
|
||||
|
||||
+1
-1
@@ -177,7 +177,7 @@ public class FastHttpDateFormat {
|
||||
Long cachedDate = null;
|
||||
|
||||
try {
|
||||
cachedDate = (Long) parseCache.get(value);
|
||||
cachedDate = parseCache.get(value);
|
||||
}
|
||||
catch (Exception ignored) {
|
||||
}
|
||||
|
||||
+2
-2
@@ -47,12 +47,12 @@ public class DefaultServerRedirectStrategyTests {
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void sendRedirectWhenLocationNullThenException() {
|
||||
this.strategy.sendRedirect(this.exchange, (URI) null);
|
||||
this.strategy.sendRedirect(this.exchange, null);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void sendRedirectWhenExchangeNullThenException() {
|
||||
this.strategy.sendRedirect((ServerWebExchange) null, this.location);
|
||||
this.strategy.sendRedirect(null, this.location);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class RedirectServerAuthenticationEntryPointTests {
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void constructorStringWhenNullLocationThenException() {
|
||||
new RedirectServerAuthenticationEntryPoint((String) null);
|
||||
new RedirectServerAuthenticationEntryPoint(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class RedirectServerAuthenticationFailureHandlerTests {
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void constructorStringWhenNullLocationThenException() {
|
||||
new RedirectServerAuthenticationEntryPoint((String) null);
|
||||
new RedirectServerAuthenticationEntryPoint(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class HttpStatusServerAccessDeniedHandlerTests {
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void constructorHttpStatusWhenNullThenException() {
|
||||
new HttpStatusServerAccessDeniedHandler((HttpStatus) null);
|
||||
new HttpStatusServerAccessDeniedHandler(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user