Import cleaning, removal of unnecessary constructors etc based on eclipse warnings
This commit is contained in:
parent
abd5e384fe
commit
8f7b216de3
|
@ -25,7 +25,6 @@ import org.springframework.security.acls.ChildrenExistException;
|
|||
import org.springframework.security.acls.MutableAcl;
|
||||
import org.springframework.security.acls.NotFoundException;
|
||||
import org.springframework.security.acls.Permission;
|
||||
import org.springframework.security.acls.domain.AclImpl;
|
||||
import org.springframework.security.acls.domain.BasePermission;
|
||||
import org.springframework.security.acls.objectidentity.ObjectIdentity;
|
||||
import org.springframework.security.acls.objectidentity.ObjectIdentityImpl;
|
||||
|
|
|
@ -29,7 +29,7 @@ import javax.naming.NamingException;
|
|||
* <code>java:comp/env/security/subject</code>.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
* @version $Id:MockInitialContext.java 2151 2007-09-22 11:54:13Z luke_t $
|
||||
*/
|
||||
public class MockInitialContext implements Context {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
@ -42,10 +42,6 @@ public class MockInitialContext implements Context {
|
|||
this.object = object;
|
||||
}
|
||||
|
||||
private MockInitialContext() {
|
||||
super();
|
||||
}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public Object addToEnvironment(String propName, Object propVal)
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.naming.NamingException;
|
|||
* constructor.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
* @version $Id:MockJbossIntegrationFilter.java 2151 2007-09-22 11:54:13Z luke_t $
|
||||
*/
|
||||
public class MockJbossIntegrationFilter extends JbossIntegrationFilter {
|
||||
//~ Instance fields ================================================================================================
|
||||
|
@ -37,10 +37,6 @@ public class MockJbossIntegrationFilter extends JbossIntegrationFilter {
|
|||
this.context = context;
|
||||
}
|
||||
|
||||
private MockJbossIntegrationFilter() {
|
||||
super();
|
||||
}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
protected Context getLookupContext() throws NamingException {
|
||||
|
|
|
@ -18,7 +18,6 @@ package org.springframework.security.captcha;
|
|||
import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockFilterChain;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
package org.springframework.security.annotation;
|
||||
|
||||
import javax.annotation.security.RolesAllowed;
|
||||
import javax.annotation.security.DenyAll;
|
||||
import javax.annotation.security.PermitAll;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package org.springframework.security.annotation;
|
||||
|
||||
import javax.annotation.security.RolesAllowed;
|
||||
import javax.annotation.security.DenyAll;
|
||||
import javax.annotation.security.PermitAll;
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,7 +21,6 @@ import java.lang.reflect.Method;
|
|||
import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
import org.springframework.security.annotation.test.Entity;
|
||||
import org.springframework.security.annotation.test.OrganisationService;
|
||||
import org.springframework.security.annotation.test.PersonService;
|
||||
|
@ -90,10 +89,6 @@ public class MethodDefinitionSourceEditorTigerTests extends TestCase {
|
|||
private class MockMethodInvocation implements MethodInvocation {
|
||||
Method method;
|
||||
|
||||
private MockMethodInvocation() {
|
||||
super();
|
||||
}
|
||||
|
||||
public MockMethodInvocation(Class clazz, String methodName, Class[] parameterTypes)
|
||||
throws NoSuchMethodException {
|
||||
System.out.println(clazz + " " + methodName + " " + parameterTypes[0]);
|
||||
|
|
|
@ -18,14 +18,13 @@ package org.springframework.security;
|
|||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
/**
|
||||
* A property editor that can create a populated {@link ConfigAttributeDefinition} from a comma separated list of
|
||||
* values.<P>Trims preceding and trailing spaces from presented command separated tokens, as this can be a source
|
||||
* of hard-to-spot configuration issues for end users.</p>
|
||||
* values.
|
||||
* <p>
|
||||
* Trims preceding and trailing spaces from presented command separated tokens, as this can be a source
|
||||
* of hard-to-spot configuration issues for end users.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
|
@ -38,7 +37,6 @@ public class ConfigAttributeEditor extends PropertyEditorSupport {
|
|||
setValue(new ConfigAttributeDefinition(StringUtils.commaDelimitedListToStringArray(s)));
|
||||
} else {
|
||||
setValue(null);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ package org.springframework.security.intercept;
|
|||
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Collection;
|
||||
|
||||
|
||||
|
|
|
@ -25,9 +25,7 @@ import org.springframework.util.StringUtils;
|
|||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Map;
|
||||
import java.util.LinkedHashMap;
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.springframework.security.ConfigAttribute;
|
|||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,10 +43,6 @@ public class MockAuthenticationEntryPoint implements AuthenticationEntryPoint {
|
|||
this.url = url;
|
||||
}
|
||||
|
||||
private MockAuthenticationEntryPoint() {
|
||||
super();
|
||||
}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public void commence(ServletRequest request, ServletResponse response,
|
||||
|
|
|
@ -42,8 +42,6 @@ public class MockJoinPoint implements JoinPoint {
|
|||
this.beingInvoked = beingInvoked;
|
||||
}
|
||||
|
||||
private MockJoinPoint() {}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public Object[] getArgs() {
|
||||
|
@ -91,8 +89,6 @@ public class MockJoinPoint implements JoinPoint {
|
|||
this.beingInvoked = beingInvoked;
|
||||
}
|
||||
|
||||
private MockCodeSignature() {}
|
||||
|
||||
public Class getDeclaringType() {
|
||||
throw new UnsupportedOperationException("mock not implemented");
|
||||
}
|
||||
|
@ -137,8 +133,6 @@ public class MockJoinPoint implements JoinPoint {
|
|||
this.beingInvoked = beingInvoked;
|
||||
}
|
||||
|
||||
private MockStaticPart() {}
|
||||
|
||||
public String getKind() {
|
||||
throw new UnsupportedOperationException("mock not implemented");
|
||||
}
|
||||
|
|
|
@ -100,10 +100,6 @@ public class SecurityConfigTests extends TestCase {
|
|||
this.attribute = configuration;
|
||||
}
|
||||
|
||||
private MockConfigAttribute() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getAttribute() {
|
||||
return this.attribute;
|
||||
}
|
||||
|
|
|
@ -52,14 +52,6 @@ public class AfterInvocationProviderManagerTests extends TestCase {
|
|||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(AfterInvocationProviderManagerTests.class);
|
||||
}
|
||||
|
||||
public final void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testCorrectOperation() throws Exception {
|
||||
AfterInvocationProviderManager manager = new AfterInvocationProviderManager();
|
||||
List list = new Vector();
|
||||
|
@ -170,8 +162,6 @@ public class AfterInvocationProviderManagerTests extends TestCase {
|
|||
this.configAttribute = configAttribute;
|
||||
}
|
||||
|
||||
private MockAfterInvocationProvider() {}
|
||||
|
||||
public Object decide(Authentication authentication, Object object, ConfigAttributeDefinition config,
|
||||
Object returnedObject) throws AccessDeniedException {
|
||||
if (config.contains(configAttribute)) {
|
||||
|
|
|
@ -153,10 +153,6 @@ public class ConcurrentSessionFilterTests extends TestCase {
|
|||
this.expectToProceed = expectToProceed;
|
||||
}
|
||||
|
||||
private MockFilterChain() {
|
||||
super();
|
||||
}
|
||||
|
||||
public void doFilter(ServletRequest request, ServletResponse response)
|
||||
throws IOException, ServletException {
|
||||
if (expectToProceed) {
|
||||
|
|
|
@ -22,10 +22,6 @@ import org.springframework.security.ui.session.HttpSessionDestroyedEvent;
|
|||
import org.springframework.mock.web.MockHttpSession;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
/**
|
||||
* Tests {@link SessionRegistryImpl}.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.springframework.security.config;
|
||||
|
||||
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
|
||||
import org.springframework.security.providers.ProviderManager;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.ldap.LdapAuthenticationProvider;
|
||||
|
|
|
@ -19,7 +19,6 @@ import junit.framework.TestCase;
|
|||
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockJoinPoint;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
import org.springframework.security.TargetObject;
|
||||
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
@ -31,7 +30,7 @@ import java.util.Iterator;
|
|||
|
||||
|
||||
/**
|
||||
* Tests {@link MethodDefinitionSourceEditor} and its asociated {@link MethodDefinitionMap}.
|
||||
* Tests {@link MethodDefinitionSourceEditor} and its associated {@link MethodDefinitionMap}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
|
|
|
@ -17,7 +17,6 @@ package org.springframework.security.intercept.web;
|
|||
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockFilterChain;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
import org.springframework.security.util.AntUrlPathMatcher;
|
||||
import org.springframework.security.util.InMemoryXmlApplicationContext;
|
||||
|
||||
|
@ -27,7 +26,6 @@ import org.springframework.mock.web.MockHttpServletResponse;
|
|||
import org.junit.Test;
|
||||
import org.junit.Before;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* Tests parts of {@link DefaultFilterInvocationDefinitionSource} not tested by {@link
|
||||
|
|
|
@ -19,7 +19,6 @@ import junit.framework.TestCase;
|
|||
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockFilterChain;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
import org.springframework.security.util.RegexUrlPathMatcher;
|
||||
import org.springframework.security.util.AntUrlPathMatcher;
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
package org.springframework.security.ldap;
|
||||
|
||||
import org.springframework.security.config.BeanIds;
|
||||
import org.springframework.ldap.core.ContextSource;
|
||||
import org.springframework.ldap.core.DistinguishedName;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
@ -33,7 +32,6 @@ import javax.naming.NamingEnumeration;
|
|||
import javax.naming.Binding;
|
||||
import javax.naming.ContextNotEmptyException;
|
||||
import javax.naming.NameNotFoundException;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Based on class borrowed from Spring Ldap project.
|
||||
|
|
|
@ -146,10 +146,6 @@ public class AbstractAuthenticationTokenTests extends TestCase {
|
|||
this.credentials = credentials;
|
||||
}
|
||||
|
||||
private MockAuthenticationImpl() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
public Object getCredentials() {
|
||||
return this.credentials;
|
||||
}
|
||||
|
|
|
@ -68,10 +68,6 @@ public class AnonymousProcessingFilterTests extends TestCase {
|
|||
filter.destroy();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(AnonymousProcessingFilterTests.class);
|
||||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
SecurityContextHolder.clearContext();
|
||||
|
@ -192,10 +188,6 @@ public class AnonymousProcessingFilterTests extends TestCase {
|
|||
this.expectToProceed = expectToProceed;
|
||||
}
|
||||
|
||||
private MockFilterChain() {
|
||||
super();
|
||||
}
|
||||
|
||||
public void doFilter(ServletRequest request, ServletResponse response)
|
||||
throws IOException, ServletException {
|
||||
if (expectToProceed) {
|
||||
|
|
|
@ -219,10 +219,6 @@ public class ChannelProcessingFilterTests extends TestCase {
|
|||
this.supportAttribute = supportAttribute;
|
||||
}
|
||||
|
||||
private MockChannelDecisionManager() {
|
||||
super();
|
||||
}
|
||||
|
||||
public void decide(FilterInvocation invocation, ConfigAttributeDefinition config)
|
||||
throws IOException, ServletException {
|
||||
if (commitAResponse) {
|
||||
|
@ -272,10 +268,6 @@ public class ChannelProcessingFilterTests extends TestCase {
|
|||
this.provideIterator = provideIterator;
|
||||
}
|
||||
|
||||
private MockFilterInvocationDefinitionMap() {
|
||||
super();
|
||||
}
|
||||
|
||||
public ConfigAttributeDefinition getAttributes(Object object)
|
||||
throws IllegalArgumentException {
|
||||
FilterInvocation fi = (FilterInvocation) object;
|
||||
|
|
|
@ -190,10 +190,6 @@ public class RememberMeProcessingFilterTests extends TestCase {
|
|||
this.expectToProceed = expectToProceed;
|
||||
}
|
||||
|
||||
private MockFilterChain() {
|
||||
super();
|
||||
}
|
||||
|
||||
public void doFilter(ServletRequest request, ServletResponse response)
|
||||
throws IOException, ServletException {
|
||||
if (expectToProceed) {
|
||||
|
|
|
@ -242,10 +242,6 @@ public class FilterToBeanProxyTests extends TestCase {
|
|||
this.appContextLocation = appContextLocation;
|
||||
}
|
||||
|
||||
private MockFilterToBeanProxy() {
|
||||
super();
|
||||
}
|
||||
|
||||
protected ApplicationContext getContext(FilterConfig filterConfig) {
|
||||
return new ClassPathXmlApplicationContext(appContextLocation);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.springframework.security.AccessDeniedException;
|
|||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.springframework.security.providers.TestingAuthenticationToken;
|
||||
|
||||
|
|
|
@ -110,14 +110,6 @@ public class BasicAclEntryVoterTests extends TestCase {
|
|||
}
|
||||
|
||||
public void testStartupRejectsMissingAclManager() throws Exception {
|
||||
AclManager aclManager = new MockAclManager("domain1", "rod",
|
||||
new AclEntry[] {
|
||||
new MockAclEntry(),
|
||||
new SimpleAclEntry("rod", new MockAclObjectIdentity(), null, SimpleAclEntry.ADMINISTRATION),
|
||||
new SimpleAclEntry("rod", new MockAclObjectIdentity(), null, SimpleAclEntry.READ),
|
||||
new SimpleAclEntry("rod", new MockAclObjectIdentity(), null, SimpleAclEntry.DELETE)
|
||||
});
|
||||
|
||||
// Wire up a voter
|
||||
BasicAclEntryVoter voter = new BasicAclEntryVoter();
|
||||
voter.setProcessConfigAttribute("FOO_ADMIN_OR_WRITE_ACCESS");
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.springframework.security.AccessDeniedException;
|
|||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
import org.springframework.security.providers.TestingAuthenticationToken;
|
||||
|
||||
|
||||
|
|
|
@ -32,8 +32,6 @@ public class SomeDomainObject {
|
|||
this.identity = identity;
|
||||
}
|
||||
|
||||
private SomeDomainObject() {}
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public String getParent() {
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.springframework.security.AccessDeniedException;
|
|||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.springframework.security.providers.TestingAuthenticationToken;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<html>
|
||||
<title>Access denied!</title>
|
||||
<h1>Access Denied</h1>
|
||||
We're sorry, but you are not authorized to perform the requested operation.
|
||||
<p>We're sorry, but you are not authorized to perform the requested operation.</p>
|
||||
</html>
|
|
@ -19,7 +19,6 @@ import junit.framework.TestCase;
|
|||
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.util.InMemoryXmlApplicationContext;
|
||||
|
||||
import org.springframework.security.acl.AclEntry;
|
||||
import org.springframework.security.acl.AclManager;
|
||||
|
|
Loading…
Reference in New Issue