Delete unused imports

This commit is contained in:
Sam Brannen
2016-05-03 20:12:37 +02:00
parent 6b3eba0500
commit 7b13311f03
13 changed files with 43 additions and 38 deletions

View File

@@ -21,7 +21,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.aop.scope.ScopedProxyUtils;
@@ -34,7 +33,6 @@ import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.config.ConstructorArgumentValues;
import org.springframework.context.annotation.AnnotationConfigUtils;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.annotation.AliasFor;
import static org.junit.Assert.*;
@@ -52,8 +50,6 @@ public class QualifierAnnotationAutowireContextTests {
private static final String MARK = "mark";
private static final String SAM = "sam";
@Test
public void autowiredFieldWithSingleNonQualifiedCandidate() {

View File

@@ -28,7 +28,6 @@ import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.logging.LogFactory;
import org.junit.Ignore;
import org.junit.Test;
import org.xml.sax.InputSource;

View File

@@ -1,3 +1,19 @@
/*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cache.config;
import java.util.concurrent.atomic.AtomicLong;
@@ -12,7 +28,6 @@ import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;

View File

@@ -33,6 +33,7 @@ import example.scannable_implicitbasepackage.ComponentScanAnnotatedConfigWithImp
import example.scannable_implicitbasepackage.ConfigurableComponent;
import example.scannable_scoped.CustomScopeAnnotationBean;
import example.scannable_scoped.MyScope;
import org.junit.Test;
import org.springframework.aop.support.AopUtils;
@@ -42,7 +43,6 @@ import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.annotation.CustomAutowireConfigurer;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.EnvironmentAware;

View File

@@ -16,25 +16,32 @@
package org.springframework.validation.beanvalidation;
import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.util.Locale;
import javax.validation.Constraint;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import javax.validation.Payload;
import javax.validation.Validation;
import javax.validation.constraints.Size;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.beans.BeanWrapper;
import org.springframework.beans.BeanWrapperImpl;
import org.springframework.context.support.StaticMessageSource;
import org.springframework.util.ObjectUtils;
import org.springframework.validation.BeanPropertyBindingResult;
import javax.validation.*;
import javax.validation.constraints.Size;
import java.lang.annotation.*;
import java.util.Locale;
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
import static org.hamcrest.core.Is.*;
import static org.junit.Assert.*;
/**
* @author Kazuki Shimizu
@@ -42,16 +49,14 @@ import static org.junit.Assert.assertThat;
*/
public class SpringValidatorAdapterTests {
private SpringValidatorAdapter validatorAdapter;
private final SpringValidatorAdapter validatorAdapter = new SpringValidatorAdapter(
Validation.buildDefaultValidatorFactory().getValidator());
private StaticMessageSource messageSource;
private final StaticMessageSource messageSource = new StaticMessageSource();
@Before
public void setupSpringValidatorAdapter() {
validatorAdapter = new SpringValidatorAdapter(Validation.buildDefaultValidatorFactory().getValidator());
messageSource = new StaticMessageSource();
messageSource.addMessage("Size", Locale.ENGLISH, "Size of {0} is must be between {2} and {1}");
messageSource.addMessage("Same", Locale.ENGLISH, "{2} must be same value with {1}");
messageSource.addMessage("password", Locale.ENGLISH, "Password");
@@ -155,7 +160,7 @@ public class SpringValidatorAdapterTests {
@Target({TYPE, ANNOTATION_TYPE})
@Retention(RUNTIME)
@Repeatable(SameGroup.class)
public @interface Same {
@interface Same {
String message() default "{org.springframework.validation.beanvalidation.Same.message}";
@@ -180,7 +185,7 @@ public class SpringValidatorAdapterTests {
@Inherited
@Retention(RUNTIME)
@Target({TYPE, ANNOTATION_TYPE})
public @interface SameGroup {
@interface SameGroup {
Same[] value();
}