Skip to content

Commit f3651c9

Browse files
committed
Polish static imports
1 parent a3484ae commit f3651c9

File tree

8 files changed

+17
-18
lines changed

8 files changed

+17
-18
lines changed

Diff for: org.springframework.context/src/main/java/org/springframework/context/annotation/AdviceModeImportSelector.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
package org.springframework.context.annotation;
1818

19-
import static org.springframework.context.annotation.MetadataUtils.attributesFor;
20-
2119
import java.lang.annotation.Annotation;
2220

2321
import org.springframework.core.GenericTypeResolver;
2422
import org.springframework.core.annotation.AnnotationAttributes;
2523
import org.springframework.core.type.AnnotationMetadata;
2624
import org.springframework.util.Assert;
2725

26+
import static org.springframework.context.annotation.MetadataUtils.*;
27+
2828
/**
2929
* Convenient base class for {@link ImportSelector} implementations that select imports
3030
* based on an {@link AdviceMode} value from an annotation (such as the {@code @Enable*}

Diff for: org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.context.annotation;
1818

19-
import static org.springframework.context.annotation.MetadataUtils.attributesFor;
20-
2119
import java.util.LinkedHashSet;
2220
import java.util.Set;
2321

@@ -32,6 +30,8 @@
3230
import org.springframework.core.type.AnnotationMetadata;
3331
import org.springframework.util.ClassUtils;
3432

33+
import static org.springframework.context.annotation.MetadataUtils.*;
34+
3535
/**
3636
* Utility class that allows for convenient registration of common
3737
* {@link org.springframework.beans.factory.config.BeanPostProcessor} and

Diff for: org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationScopeMetadataResolver.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
package org.springframework.context.annotation;
1818

19-
import static org.springframework.context.annotation.MetadataUtils.attributesFor;
20-
2119
import java.lang.annotation.Annotation;
2220

2321
import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
2422
import org.springframework.beans.factory.config.BeanDefinition;
2523
import org.springframework.core.annotation.AnnotationAttributes;
2624
import org.springframework.util.Assert;
2725

26+
import static org.springframework.context.annotation.MetadataUtils.*;
27+
2828
/**
2929
* A {@link ScopeMetadataResolver} implementation that by default checks for
3030
* the presence of Spring's {@link Scope} annotation on the bean class.

Diff for: org.springframework.context/src/main/java/org/springframework/context/annotation/AspectJAutoProxyRegistrar.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
package org.springframework.context.annotation;
1818

19-
import static org.springframework.context.annotation.MetadataUtils.attributesFor;
20-
2119
import org.springframework.aop.config.AopConfigUtils;
2220
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
2321
import org.springframework.core.annotation.AnnotationAttributes;
2422
import org.springframework.core.type.AnnotationMetadata;
2523

24+
import static org.springframework.context.annotation.MetadataUtils.*;
25+
2626
/**
2727
* Registers an {@link org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator
2828
* AnnotationAwareAspectJAutoProxyCreator} against the current {@link BeanDefinitionRegistry}

Diff for: org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
import org.springframework.beans.factory.config.BeanDefinition;
3131
import org.springframework.context.ResourceLoaderAware;
3232
import org.springframework.core.annotation.AnnotationAttributes;
33-
import org.springframework.core.env.StandardEnvironment;
3433
import org.springframework.core.env.Environment;
3534
import org.springframework.core.env.EnvironmentCapable;
35+
import org.springframework.core.env.StandardEnvironment;
3636
import org.springframework.core.io.Resource;
3737
import org.springframework.core.io.ResourceLoader;
3838
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;

Diff for: org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.context.annotation;
1818

19-
import static org.springframework.context.annotation.MetadataUtils.attributesFor;
20-
2119
import java.io.IOException;
2220
import java.lang.annotation.Annotation;
2321
import java.util.ArrayList;
@@ -51,6 +49,8 @@
5149
import org.springframework.core.type.filter.AssignableTypeFilter;
5250
import org.springframework.util.StringUtils;
5351

52+
import static org.springframework.context.annotation.MetadataUtils.*;
53+
5454
/**
5555
* Parses a {@link Configuration} class definition, populating a collection of
5656
* {@link ConfigurationClass} objects (parsing a single Configuration class may result in

Diff for: org.springframework.context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.context.annotation;
1818

19-
import static org.springframework.context.weaving.AspectJWeavingEnabler.ASPECTJ_AOP_XML_RESOURCE;
20-
2119
import org.springframework.beans.factory.BeanClassLoaderAware;
2220
import org.springframework.beans.factory.annotation.Autowired;
2321
import org.springframework.beans.factory.config.BeanDefinition;
@@ -30,6 +28,8 @@
3028
import org.springframework.instrument.classloading.LoadTimeWeaver;
3129
import org.springframework.util.Assert;
3230

31+
import static org.springframework.context.weaving.AspectJWeavingEnabler.*;
32+
3333
/**
3434
* {@code @Configuration} class that registers a {@link LoadTimeWeaver} bean.
3535
*

Diff for: org.springframework.context/src/test/java/org/springframework/context/annotation/ImportAwareTests.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616

1717
package org.springframework.context.annotation;
1818

19-
import static org.hamcrest.CoreMatchers.is;
20-
import static org.hamcrest.CoreMatchers.notNullValue;
21-
import static org.junit.Assert.assertThat;
22-
import static org.springframework.context.annotation.MetadataUtils.attributesFor;
23-
2419
import java.lang.annotation.ElementType;
2520
import java.lang.annotation.Retention;
2621
import java.lang.annotation.RetentionPolicy;
@@ -35,6 +30,10 @@
3530
import org.springframework.core.type.AnnotationMetadata;
3631
import org.springframework.scheduling.annotation.AsyncAnnotationBeanPostProcessor;
3732

33+
import static org.hamcrest.CoreMatchers.*;
34+
import static org.junit.Assert.*;
35+
import static org.springframework.context.annotation.MetadataUtils.*;
36+
3837
/**
3938
* Tests that an ImportAware @Configuration classes gets injected with the
4039
* annotation metadata of the @Configuration class that imported it.

0 commit comments

Comments
 (0)