diff --git a/acl/src/test/java/org/springframework/security/acls/domain/ObjectIdentityImplTests.java b/acl/src/test/java/org/springframework/security/acls/domain/ObjectIdentityImplTests.java index ae9496924e..84ab828ff7 100644 --- a/acl/src/test/java/org/springframework/security/acls/domain/ObjectIdentityImplTests.java +++ b/acl/src/test/java/org/springframework/security/acls/domain/ObjectIdentityImplTests.java @@ -12,6 +12,7 @@ import org.springframework.security.acls.model.ObjectIdentity; * * @author Andrei Stefan */ +@SuppressWarnings("unused") public class ObjectIdentityImplTests { private static final String DOMAIN_CLASS = @@ -174,7 +175,6 @@ public class ObjectIdentityImplTests { } } - @SuppressWarnings("unused") private class MockOtherIdDomainObject { private Object id; diff --git a/acl/src/test/java/org/springframework/security/acls/domain/ObjectIdentityRetrievalStrategyImplTests.java b/acl/src/test/java/org/springframework/security/acls/domain/ObjectIdentityRetrievalStrategyImplTests.java index 3744b54d35..ed0c250530 100644 --- a/acl/src/test/java/org/springframework/security/acls/domain/ObjectIdentityRetrievalStrategyImplTests.java +++ b/acl/src/test/java/org/springframework/security/acls/domain/ObjectIdentityRetrievalStrategyImplTests.java @@ -14,20 +14,20 @@ import junit.framework.TestCase; */ public class ObjectIdentityRetrievalStrategyImplTests extends TestCase { //~ Methods ======================================================================================================== - + public void testObjectIdentityCreation() throws Exception { MockIdDomainObject domain = new MockIdDomainObject(); domain.setId(new Integer(1)); - + ObjectIdentityRetrievalStrategy retStrategy = new ObjectIdentityRetrievalStrategyImpl(); ObjectIdentity identity = retStrategy.getObjectIdentity(domain); - + assertNotNull(identity); assertEquals(identity, new ObjectIdentityImpl(domain)); } - + //~ Inner Classes ================================================================================================== - + @SuppressWarnings("unused") private class MockIdDomainObject { private Object id; diff --git a/config/src/main/java/org/springframework/security/config/http/RememberMeBeanDefinitionParser.java b/config/src/main/java/org/springframework/security/config/http/RememberMeBeanDefinitionParser.java index 8dae5ebfa3..8e0198c59e 100644 --- a/config/src/main/java/org/springframework/security/config/http/RememberMeBeanDefinitionParser.java +++ b/config/src/main/java/org/springframework/security/config/http/RememberMeBeanDefinitionParser.java @@ -36,7 +36,7 @@ class RememberMeBeanDefinitionParser implements BeanDefinitionParser { private final String key; RememberMeBeanDefinitionParser(String key) { - this.key = key; + this.key = key; } public BeanDefinition parse(Element element, ParserContext pc) { diff --git a/config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java b/config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java index 12f0342fcc..d2351983c3 100644 --- a/config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java +++ b/config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java @@ -817,6 +817,7 @@ public class HttpSecurityBeanDefinitionParserTests { etf.getAuthenticationEntryPoint() instanceof MockEntryPoint); } + @SuppressWarnings("unused") private static class MockEntryPoint extends LoginUrlAuthenticationEntryPoint { public MockEntryPoint() { super.setLoginFormUrl("/notused"); diff --git a/config/src/test/java/org/springframework/security/config/method/InterceptMethodsBeanDefinitionDecoratorTests.java b/config/src/test/java/org/springframework/security/config/method/InterceptMethodsBeanDefinitionDecoratorTests.java index fe385d9654..8e8a32117b 100644 --- a/config/src/test/java/org/springframework/security/config/method/InterceptMethodsBeanDefinitionDecoratorTests.java +++ b/config/src/test/java/org/springframework/security/config/method/InterceptMethodsBeanDefinitionDecoratorTests.java @@ -44,7 +44,7 @@ public class InterceptMethodsBeanDefinitionDecoratorTests { assertEquals(1, appContext.getBeanNamesForType(ApplicationListener.class).length); appContext.publishEvent(new AuthenticationSuccessEvent(new TestingAuthenticationToken("user", ""))); - assertTrue(target instanceof ApplicationListener); + assertTrue(target instanceof ApplicationListener); } @Test diff --git a/core/src/main/java/org/springframework/security/access/expression/method/ExpressionBasedPreInvocationAdvice.java b/core/src/main/java/org/springframework/security/access/expression/method/ExpressionBasedPreInvocationAdvice.java index d882e887e8..5b8432bc5b 100644 --- a/core/src/main/java/org/springframework/security/access/expression/method/ExpressionBasedPreInvocationAdvice.java +++ b/core/src/main/java/org/springframework/security/access/expression/method/ExpressionBasedPreInvocationAdvice.java @@ -53,8 +53,7 @@ public class ExpressionBasedPreInvocationAdvice implements PreInvocationAuthoriz } } else if (mi.getArguments().length == 1) { Object arg = mi.getArguments()[0]; - if (arg.getClass().isArray() || - arg instanceof Collection) { + if (arg.getClass().isArray() || arg instanceof Collection) { filterTarget = arg; } if (filterTarget == null) { diff --git a/core/src/main/java/org/springframework/security/core/authority/mapping/MapBasedAttributes2GrantedAuthoritiesMapper.java b/core/src/main/java/org/springframework/security/core/authority/mapping/MapBasedAttributes2GrantedAuthoritiesMapper.java index 47adcae34a..3cc30c0441 100755 --- a/core/src/main/java/org/springframework/security/core/authority/mapping/MapBasedAttributes2GrantedAuthoritiesMapper.java +++ b/core/src/main/java/org/springframework/security/core/authority/mapping/MapBasedAttributes2GrantedAuthoritiesMapper.java @@ -107,7 +107,7 @@ public class MapBasedAttributes2GrantedAuthoritiesMapper implements Attributes2G if ( value == null ) { return; } - if ( value instanceof Collection ) { + if ( value instanceof Collection ) { addGrantedAuthorityCollection(result,(Collection)value); } else if ( value instanceof Object[] ) { addGrantedAuthorityCollection(result,(Object[])value); diff --git a/core/src/main/resources/org/springframework/security/adapters/acegisecurity.xml b/core/src/main/resources/org/springframework/security/adapters/acegisecurity.xml deleted file mode 100644 index 5e46228021..0000000000 --- a/core/src/main/resources/org/springframework/security/adapters/acegisecurity.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - rod=koala,ROLE_TELLER,ROLE_SUPERVISOR - dianne=emu,ROLE_TELLER - scott=wombat,ROLE_TELLER - peter=opal,disabled,ROLE_TELLER - - - - - - - - true - - - - - - - - - - - - diff --git a/core/src/main/resources/org/springframework/security/adapters/adaptertest-invalid.xml b/core/src/main/resources/org/springframework/security/adapters/adaptertest-invalid.xml deleted file mode 100644 index 555110407c..0000000000 --- a/core/src/main/resources/org/springframework/security/adapters/adaptertest-invalid.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - rod=koala,ROLE_TELLER,ROLE_SUPERVISOR - dianne=emu,ROLE_TELLER - scott=wombat,ROLE_TELLER - peter=opal,disabled,ROLE_TELLER - - - - - - - diff --git a/core/src/main/resources/org/springframework/security/adapters/adaptertest-valid.xml b/core/src/main/resources/org/springframework/security/adapters/adaptertest-valid.xml deleted file mode 100644 index 5e46228021..0000000000 --- a/core/src/main/resources/org/springframework/security/adapters/adaptertest-valid.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - rod=koala,ROLE_TELLER,ROLE_SUPERVISOR - dianne=emu,ROLE_TELLER - scott=wombat,ROLE_TELLER - peter=opal,disabled,ROLE_TELLER - - - - - - - - true - - - - - - - - - - - - diff --git a/core/src/test/java/org/springframework/security/access/hierarchicalroles/TestHelperTests.java b/core/src/test/java/org/springframework/security/access/hierarchicalroles/TestHelperTests.java index db25aa27ab..f73d3728b5 100755 --- a/core/src/test/java/org/springframework/security/access/hierarchicalroles/TestHelperTests.java +++ b/core/src/test/java/org/springframework/security/access/hierarchicalroles/TestHelperTests.java @@ -83,19 +83,19 @@ public class TestHelperTests { authoritiesStrings5.add("ROLE_A"); assertTrue(CollectionUtils.isEqualCollection( - HierarchicalRolesTestHelper.toCollectionOfAuthorityStrings(authorities1), authoritiesStrings1)); + HierarchicalRolesTestHelper.toCollectionOfAuthorityStrings(authorities1), authoritiesStrings1)); assertTrue(CollectionUtils.isEqualCollection( - HierarchicalRolesTestHelper.toCollectionOfAuthorityStrings(authorities2), authoritiesStrings2)); + HierarchicalRolesTestHelper.toCollectionOfAuthorityStrings(authorities2), authoritiesStrings2)); assertTrue(CollectionUtils.isEqualCollection( - HierarchicalRolesTestHelper.toCollectionOfAuthorityStrings(authorities3), authoritiesStrings3)); + HierarchicalRolesTestHelper.toCollectionOfAuthorityStrings(authorities3), authoritiesStrings3)); assertTrue(CollectionUtils.isEqualCollection( - HierarchicalRolesTestHelper.toCollectionOfAuthorityStrings(authorities4), authoritiesStrings4)); + HierarchicalRolesTestHelper.toCollectionOfAuthorityStrings(authorities4), authoritiesStrings4)); assertTrue(CollectionUtils.isEqualCollection( - HierarchicalRolesTestHelper.toCollectionOfAuthorityStrings(authorities5), authoritiesStrings5)); + HierarchicalRolesTestHelper.toCollectionOfAuthorityStrings(authorities5), authoritiesStrings5)); } // SEC-863 diff --git a/core/src/test/java/org/springframework/security/access/intercept/method/MapBasedMethodSecurityMetadataSourceTests.java b/core/src/test/java/org/springframework/security/access/intercept/method/MapBasedMethodSecurityMetadataSourceTests.java index 79eaf7aa36..70437a00b2 100644 --- a/core/src/test/java/org/springframework/security/access/intercept/method/MapBasedMethodSecurityMetadataSourceTests.java +++ b/core/src/test/java/org/springframework/security/access/intercept/method/MapBasedMethodSecurityMetadataSourceTests.java @@ -47,6 +47,7 @@ public class MapBasedMethodSecurityMetadataSourceTests { assertEquals(ROLE_B, mds.getAttributes(someMethodString, MockService.class)); } + @SuppressWarnings("unused") private class MockService { public void someMethod(String s) { } diff --git a/core/src/test/java/org/springframework/security/access/vote/AbstractAclVoterTests.java b/core/src/test/java/org/springframework/security/access/vote/AbstractAclVoterTests.java index e80b2041de..614bc58c2a 100644 --- a/core/src/test/java/org/springframework/security/access/vote/AbstractAclVoterTests.java +++ b/core/src/test/java/org/springframework/security/access/vote/AbstractAclVoterTests.java @@ -60,6 +60,7 @@ public class AbstractAclVoterTests { assertEquals("The Argument", voter.getDomainObjectInstance(mi)); } + @SuppressWarnings("unused") private static class TestClass { public void methodTakingAString(String arg) { } diff --git a/core/src/test/java/org/springframework/security/core/authority/GrantedAuthorityImplTests.java b/core/src/test/java/org/springframework/security/core/authority/GrantedAuthorityImplTests.java index b98d1660a7..e628e7908a 100644 --- a/core/src/test/java/org/springframework/security/core/authority/GrantedAuthorityImplTests.java +++ b/core/src/test/java/org/springframework/security/core/authority/GrantedAuthorityImplTests.java @@ -89,10 +89,6 @@ public class GrantedAuthorityImplTests { this.role = role; } - public int compareTo(GrantedAuthority o) { - throw new UnsupportedOperationException(); - } - public String getAuthority() { return this.role; } diff --git a/core/src/test/java/org/springframework/security/remoting/dns/JndiDnsResolverTest.java b/core/src/test/java/org/springframework/security/remoting/dns/JndiDnsResolverTest.java index 9f421c00c6..bd753f80ca 100644 --- a/core/src/test/java/org/springframework/security/remoting/dns/JndiDnsResolverTest.java +++ b/core/src/test/java/org/springframework/security/remoting/dns/JndiDnsResolverTest.java @@ -30,91 +30,91 @@ import org.junit.Before; import org.junit.Test; /** - * + * * @author Mike Wiesner * @since 3.0 * @version $Id$ */ public class JndiDnsResolverTest { - - private JndiDnsResolver dnsResolver; - private InitialContextFactory contextFactory; - private DirContext context; - - @Before - public void setup() { - contextFactory = mock(InitialContextFactory.class); - context = mock(DirContext.class); - dnsResolver = new JndiDnsResolver(); - dnsResolver.setCtxFactory(contextFactory); - when(contextFactory.getCtx()).thenReturn(context); - } - - @Test - public void testResolveIpAddress() throws Exception { - Attributes records = new BasicAttributes("A","63.246.7.80"); - - when(context.getAttributes("www.springsource.com", new String[] {"A"})).thenReturn(records); - - String ipAddress = dnsResolver.resolveIpAddress("www.springsource.com"); - assertEquals("63.246.7.80", ipAddress); - } - - @Test(expected=DnsEntryNotFoundException.class) - public void testResolveIpAddressNotExisting() throws Exception { - when(context.getAttributes(any(String.class), any(String[].class))).thenThrow(new NameNotFoundException("not found")); - - dnsResolver.resolveIpAddress("notexisting.ansdansdugiuzgguzgioansdiandwq.foo"); - } - - @Test - public void testResolveServiceEntry() throws Exception { - BasicAttributes records = createSrvRecords(); - - when(context.getAttributes("_ldap._tcp.springsource.com", new String[] {"SRV"})).thenReturn(records); - - String hostname = dnsResolver.resolveServiceEntry("ldap", "springsource.com"); - assertEquals("kdc.springsource.com", hostname); - } - - @Test(expected=DnsEntryNotFoundException.class) - public void testResolveServiceEntryNotExisting() throws Exception { - when(context.getAttributes(any(String.class), any(String[].class))).thenThrow(new NameNotFoundException("not found")); - - dnsResolver.resolveServiceEntry("wrong", "secpod.de"); - } - - @Test - public void testResolveServiceIpAddress() throws Exception { - BasicAttributes srvRecords = createSrvRecords(); - BasicAttributes aRecords = new BasicAttributes("A", "63.246.7.80"); - when(context.getAttributes("_ldap._tcp.springsource.com", new String[] {"SRV"})).thenReturn(srvRecords); - when(context.getAttributes("kdc.springsource.com", new String[] {"A"})).thenReturn(aRecords); - - String ipAddress = dnsResolver.resolveServiceIpAddress("ldap", "springsource.com"); - assertEquals("63.246.7.80", ipAddress); - } - - @Test(expected=DnsLookupException.class) - public void testUnknowError() throws Exception { - when(context.getAttributes(any(String.class), any(String[].class))).thenThrow(new NamingException("error")); - dnsResolver.resolveIpAddress(""); - } + private JndiDnsResolver dnsResolver; + private InitialContextFactory contextFactory; + private DirContext context; - + @Before + public void setup() { + contextFactory = mock(InitialContextFactory.class); + context = mock(DirContext.class); + dnsResolver = new JndiDnsResolver(); + dnsResolver.setCtxFactory(contextFactory); + when(contextFactory.getCtx()).thenReturn(context); + } - private BasicAttributes createSrvRecords() { - BasicAttributes records = new BasicAttributes(); - BasicAttribute record = new BasicAttribute("SRV"); - // the structure of the service records is: - // priority weight port hostname - // for more information: http://en.wikipedia.org/wiki/SRV_record - record.add("20 80 389 kdc3.springsource.com."); - record.add("10 70 389 kdc.springsource.com."); - record.add("20 20 389 kdc4.springsource.com."); - record.add("10 30 389 kdc2.springsource.com"); - records.put(record); - return records; - } + @Test + public void testResolveIpAddress() throws Exception { + Attributes records = new BasicAttributes("A","63.246.7.80"); + + when(context.getAttributes("www.springsource.com", new String[] {"A"})).thenReturn(records); + + String ipAddress = dnsResolver.resolveIpAddress("www.springsource.com"); + assertEquals("63.246.7.80", ipAddress); + } + + @Test(expected=DnsEntryNotFoundException.class) + public void testResolveIpAddressNotExisting() throws Exception { + when(context.getAttributes(any(String.class), any(String[].class))).thenThrow(new NameNotFoundException("not found")); + + dnsResolver.resolveIpAddress("notexisting.ansdansdugiuzgguzgioansdiandwq.foo"); + } + + @Test + public void testResolveServiceEntry() throws Exception { + BasicAttributes records = createSrvRecords(); + + when(context.getAttributes("_ldap._tcp.springsource.com", new String[] {"SRV"})).thenReturn(records); + + String hostname = dnsResolver.resolveServiceEntry("ldap", "springsource.com"); + assertEquals("kdc.springsource.com", hostname); + } + + + @Test(expected=DnsEntryNotFoundException.class) + public void testResolveServiceEntryNotExisting() throws Exception { + when(context.getAttributes(any(String.class), any(String[].class))).thenThrow(new NameNotFoundException("not found")); + + dnsResolver.resolveServiceEntry("wrong", "secpod.de"); + } + + @Test + public void testResolveServiceIpAddress() throws Exception { + BasicAttributes srvRecords = createSrvRecords(); + BasicAttributes aRecords = new BasicAttributes("A", "63.246.7.80"); + when(context.getAttributes("_ldap._tcp.springsource.com", new String[] {"SRV"})).thenReturn(srvRecords); + when(context.getAttributes("kdc.springsource.com", new String[] {"A"})).thenReturn(aRecords); + + String ipAddress = dnsResolver.resolveServiceIpAddress("ldap", "springsource.com"); + assertEquals("63.246.7.80", ipAddress); + } + + @Test(expected=DnsLookupException.class) + public void testUnknowError() throws Exception { + when(context.getAttributes(any(String.class), any(String[].class))).thenThrow(new NamingException("error")); + dnsResolver.resolveIpAddress(""); + } + + + + private BasicAttributes createSrvRecords() { + BasicAttributes records = new BasicAttributes(); + BasicAttribute record = new BasicAttribute("SRV"); + // the structure of the service records is: + // priority weight port hostname + // for more information: http://en.wikipedia.org/wiki/SRV_record + record.add("20 80 389 kdc3.springsource.com."); + record.add("10 70 389 kdc.springsource.com."); + record.add("20 20 389 kdc4.springsource.com."); + record.add("10 30 389 kdc2.springsource.com"); + records.put(record); + return records; + } } diff --git a/samples/contacts/client/clientContext.xml b/samples/contacts/client/clientContext.xml index 12bfc2656a..d14785d835 100644 --- a/samples/contacts/client/clientContext.xml +++ b/samples/contacts/client/clientContext.xml @@ -4,71 +4,70 @@ - - - client.properties - + + + client.properties + - - + + + --> - - - - - sample.contact.ContactManager - - - http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-httpinvoker - - - - - + + + + + sample.contact.ContactManager + + + http://${serverName}:${httpPort}${contextPath}/remoting/ContactManager-httpinvoker + + + + + - - + + - + - + - \ No newline at end of file + diff --git a/samples/contacts/src/main/webapp/WEB-INF/remoting-servlet.xml b/samples/contacts/src/main/webapp/WEB-INF/remoting-servlet.xml index 6316660774..3f3311071f 100644 --- a/samples/contacts/src/main/webapp/WEB-INF/remoting-servlet.xml +++ b/samples/contacts/src/main/webapp/WEB-INF/remoting-servlet.xml @@ -7,44 +7,44 @@ --> - - - + + + - - - - - - + + + + + + - - - + + - - - + + diff --git a/samples/dms/src/main/resources/applicationContext-dms-shared.xml b/samples/dms/src/main/resources/applicationContext-dms-shared.xml index 85b2a9971e..aeec3f9b87 100755 --- a/samples/dms/src/main/resources/applicationContext-dms-shared.xml +++ b/samples/dms/src/main/resources/applicationContext-dms-shared.xml @@ -9,12 +9,12 @@ - - - + + + - - - + + + diff --git a/samples/tutorial/src/main/webapp/WEB-INF/bank-servlet.xml b/samples/tutorial/src/main/webapp/WEB-INF/bank-servlet.xml index a626bc2685..b6e9e7075b 100644 --- a/samples/tutorial/src/main/webapp/WEB-INF/bank-servlet.xml +++ b/samples/tutorial/src/main/webapp/WEB-INF/bank-servlet.xml @@ -4,17 +4,17 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> - - - - - - - - - - - - + + + - \ No newline at end of file + + + + + + + + + + diff --git a/taglibs/src/test/java/org/springframework/security/taglibs/authz/AuthorizeTagCustomGrantedAuthorityTests.java b/taglibs/src/test/java/org/springframework/security/taglibs/authz/AuthorizeTagCustomGrantedAuthorityTests.java index fb339121c0..e86b4500ea 100644 --- a/taglibs/src/test/java/org/springframework/security/taglibs/authz/AuthorizeTagCustomGrantedAuthorityTests.java +++ b/taglibs/src/test/java/org/springframework/security/taglibs/authz/AuthorizeTagCustomGrantedAuthorityTests.java @@ -79,10 +79,6 @@ public class AuthorizeTagCustomGrantedAuthorityTests extends TestCase { private static class CustomGrantedAuthority implements GrantedAuthority { private final String authority; - public int compareTo(GrantedAuthority o) { - return 0; - } - public CustomGrantedAuthority(String authority) { this.authority = authority; } diff --git a/web/src/test/java/org/springframework/security/web/authentication/DefaultLoginPageGeneratingFilterTests.java b/web/src/test/java/org/springframework/security/web/authentication/DefaultLoginPageGeneratingFilterTests.java index 9b58de106c..33f125ee39 100644 --- a/web/src/test/java/org/springframework/security/web/authentication/DefaultLoginPageGeneratingFilterTests.java +++ b/web/src/test/java/org/springframework/security/web/authentication/DefaultLoginPageGeneratingFilterTests.java @@ -42,6 +42,7 @@ public class DefaultLoginPageGeneratingFilterTests { } // Fake OpenID filter (since it's not in this module + @SuppressWarnings("unused") private static class MockProcessingFilter extends AbstractAuthenticationProcessingFilter { protected MockProcessingFilter() { super("/someurl"); diff --git a/web/src/test/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilterTests.java b/web/src/test/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilterTests.java index 7728fbac61..645f43421b 100644 --- a/web/src/test/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilterTests.java +++ b/web/src/test/java/org/springframework/security/web/authentication/switchuser/SwitchUserFilterTests.java @@ -405,9 +405,5 @@ public class SwitchUserFilterTests { throw new UsernameNotFoundException("Could not find: " + username); } } - - public void setPassword(String password) { - this.password = password; - } } } diff --git a/web/src/test/java/org/springframework/security/web/authentication/www/DigestAuthenticationFilterTests.java b/web/src/test/java/org/springframework/security/web/authentication/www/DigestAuthenticationFilterTests.java index 2ea89426b9..291d354832 100644 --- a/web/src/test/java/org/springframework/security/web/authentication/www/DigestAuthenticationFilterTests.java +++ b/web/src/test/java/org/springframework/security/web/authentication/www/DigestAuthenticationFilterTests.java @@ -297,7 +297,7 @@ public class DigestAuthenticationFilterTests { ((UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername()); assertFalse(SecurityContextHolder.getContext().getAuthentication().isAuthenticated()); } - + @Test public void testNormalOperationWhenPasswordNotAlreadyEncodedAndWithoutReAuthentication() throws Exception { String responseDigest = DigestAuthUtils.generateDigest(false, USERNAME, REALM, PASSWORD, "GET", @@ -313,8 +313,8 @@ public class DigestAuthenticationFilterTests { assertEquals(USERNAME, ((UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername()); assertTrue(SecurityContextHolder.getContext().getAuthentication().isAuthenticated()); - assertEquals(AuthorityUtils.createAuthorityList("ROLE_ONE","ROLE_TWO"), - SecurityContextHolder.getContext().getAuthentication().getAuthorities()); + assertEquals(AuthorityUtils.createAuthorityList("ROLE_ONE","ROLE_TWO"), + SecurityContextHolder.getContext().getAuthentication().getAuthorities()); } @Test diff --git a/web/src/test/resources/webxml/NoRoles.web.xml b/web/src/test/resources/webxml/NoRoles.web.xml index 688397cc8c..4b8dae5004 100755 --- a/web/src/test/resources/webxml/NoRoles.web.xml +++ b/web/src/test/resources/webxml/NoRoles.web.xml @@ -1,51 +1,51 @@ - poc-acegi-web - - contextConfigLocation - classpath:j2ee-acegi-security.xml - - - log4jConfigLocation - /WEB-INF/classes/log4j.properties - + poc-acegi-web + + contextConfigLocation + classpath:j2ee-acegi-security.xml + + + log4jConfigLocation + /WEB-INF/classes/log4j.properties + springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy - + springSecurityFilterChain /* - - - org.springframework.web.util.Log4jConfigListener - - - org.springframework.web.context.ContextLoaderListener - - - org.acegisecurity.ui.session.HttpSessionEventPublisher - - - dispatch - org.springframework.web.servlet.DispatcherServlet - 1 - - - dispatch - *.form - - - index.html - index.htm - index.jsp - default.html - default.htm - default.jsp - + + org.springframework.web.util.Log4jConfigListener + + + org.springframework.web.context.ContextLoaderListener + + + org.acegisecurity.ui.session.HttpSessionEventPublisher + + + + dispatch + org.springframework.web.servlet.DispatcherServlet + 1 + + + dispatch + *.form + + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + diff --git a/web/src/test/resources/webxml/Role1-4.web.xml b/web/src/test/resources/webxml/Role1-4.web.xml index bbf25e1e63..d0acd42df4 100755 --- a/web/src/test/resources/webxml/Role1-4.web.xml +++ b/web/src/test/resources/webxml/Role1-4.web.xml @@ -1,88 +1,88 @@ - poc-acegi-web - - contextConfigLocation - classpath:j2ee-acegi-security.xml - - - log4jConfigLocation - /WEB-INF/classes/log4j.properties - + poc-acegi-web + + contextConfigLocation + classpath:j2ee-acegi-security.xml + + + log4jConfigLocation + /WEB-INF/classes/log4j.properties + springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy - + springSecurityFilterChain /* - - - org.springframework.web.util.Log4jConfigListener - - - org.springframework.web.context.ContextLoaderListener - - - org.acegisecurity.ui.session.HttpSessionEventPublisher - - - dispatch - org.springframework.web.servlet.DispatcherServlet - 1 - - - dispatch - *.form - - - index.html - index.htm - index.jsp - default.html - default.htm - default.jsp - - - jms/testQueue - javax.jms.Queue - Container - Shareable - - - jms/testQCF - javax.jms.QueueConnectionFactory - Container - Shareable - - - - Default - /* - - - * - - - - - Role1 - - - - Role2 - - - - Role3 - - - - Role4 - + + org.springframework.web.util.Log4jConfigListener + + + org.springframework.web.context.ContextLoaderListener + + + org.acegisecurity.ui.session.HttpSessionEventPublisher + + + + dispatch + org.springframework.web.servlet.DispatcherServlet + 1 + + + dispatch + *.form + + + index.html + index.htm + index.jsp + default.html + default.htm + default.jsp + + + jms/testQueue + javax.jms.Queue + Container + Shareable + + + jms/testQCF + javax.jms.QueueConnectionFactory + Container + Shareable + + + + Default + /* + + + * + + + + + Role1 + + + + Role2 + + + + Role3 + + + + Role4 +