Suppress warnings in AbstractAuthorizeTag and AuthorizeTagCustomGrantedAuthorityTests

This commit is contained in:
Rob Winch 2012-04-22 21:24:41 -05:00
parent d57f1d56d5
commit b626a63b85
2 changed files with 3 additions and 1 deletions

View File

@ -309,7 +309,7 @@ public abstract class AbstractAuthorizeTag {
return target; return target;
} }
@SuppressWarnings("unchecked") @SuppressWarnings({ "unchecked", "rawtypes" })
private SecurityExpressionHandler<FilterInvocation> getExpressionHandler() throws IOException { private SecurityExpressionHandler<FilterInvocation> getExpressionHandler() throws IOException {
ApplicationContext appContext = WebApplicationContextUtils ApplicationContext appContext = WebApplicationContextUtils
.getRequiredWebApplicationContext(getServletContext()); .getRequiredWebApplicationContext(getServletContext());

View File

@ -33,6 +33,7 @@ import java.util.*;
* *
* @author Francois Beausoleil * @author Francois Beausoleil
*/ */
@SuppressWarnings("deprecation")
public class AuthorizeTagCustomGrantedAuthorityTests { public class AuthorizeTagCustomGrantedAuthorityTests {
//~ Instance fields ================================================================================================ //~ Instance fields ================================================================================================
@ -57,6 +58,7 @@ public class AuthorizeTagCustomGrantedAuthorityTests {
} }
@Test @Test
@SuppressWarnings("serial")
public void testRejectsRequestWhenCustomAuthorityReturnsNull() throws JspException { public void testRejectsRequestWhenCustomAuthorityReturnsNull() throws JspException {
authorizeTag.setIfAnyGranted("ROLE_TELLER"); authorizeTag.setIfAnyGranted("ROLE_TELLER");
List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>(); List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();