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

Cleanup redundant type casts

This commit is contained in:
Lars Grefer
2019-07-04 19:04:19 +02:00
committed by Rob Winch
parent 43737a56bd
commit c5b5cc507c
31 changed files with 38 additions and 42 deletions
@@ -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");
}
@@ -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:
@@ -177,7 +177,7 @@ public class FastHttpDateFormat {
Long cachedDate = null;
try {
cachedDate = (Long) parseCache.get(value);
cachedDate = parseCache.get(value);
}
catch (Exception ignored) {
}
@@ -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
@@ -56,7 +56,7 @@ public class RedirectServerAuthenticationEntryPointTests {
@Test(expected = IllegalArgumentException.class)
public void constructorStringWhenNullLocationThenException() {
new RedirectServerAuthenticationEntryPoint((String) null);
new RedirectServerAuthenticationEntryPoint(null);
}
@Test
@@ -56,7 +56,7 @@ public class RedirectServerAuthenticationFailureHandlerTests {
@Test(expected = IllegalArgumentException.class)
public void constructorStringWhenNullLocationThenException() {
new RedirectServerAuthenticationEntryPoint((String) null);
new RedirectServerAuthenticationEntryPoint(null);
}
@Test
@@ -45,7 +45,7 @@ public class HttpStatusServerAccessDeniedHandlerTests {
@Test(expected = IllegalArgumentException.class)
public void constructorHttpStatusWhenNullThenException() {
new HttpStatusServerAccessDeniedHandler((HttpStatus) null);
new HttpStatusServerAccessDeniedHandler(null);
}
@Test