Skip to content

Commit 634bb77

Browse files
committed
Organize imports with new settings
See spring-projectsgh-4234
1 parent 1e4d974 commit 634bb77

File tree

378 files changed

+699
-480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

378 files changed

+699
-480
lines changed

spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/EndpointDocumentation.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@
2828

2929
import javax.servlet.Filter;
3030

31+
import groovy.text.Template;
32+
import groovy.text.TemplateEngine;
3133
import org.junit.Before;
3234
import org.junit.Rule;
3335
import org.junit.Test;
3436
import org.junit.runner.RunWith;
37+
3538
import org.springframework.beans.factory.annotation.Autowired;
3639
import org.springframework.beans.factory.annotation.Qualifier;
3740
import org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint;
@@ -50,9 +53,6 @@
5053
import org.springframework.util.StringUtils;
5154
import org.springframework.web.context.WebApplicationContext;
5255

53-
import groovy.text.Template;
54-
import groovy.text.TemplateEngine;
55-
5656
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
5757
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
5858
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;

spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HealthEndpointDocumentation.java

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.junit.Rule;
2121
import org.junit.Test;
2222
import org.junit.runner.RunWith;
23+
2324
import org.springframework.beans.factory.annotation.Autowired;
2425
import org.springframework.boot.test.SpringApplicationConfiguration;
2526
import org.springframework.http.MediaType;

spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/HypermediaEndpointDocumentation.java

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.junit.Rule;
2121
import org.junit.Test;
2222
import org.junit.runner.RunWith;
23+
2324
import org.springframework.beans.factory.annotation.Autowired;
2425
import org.springframework.boot.test.SpringApplicationConfiguration;
2526
import org.springframework.http.MediaType;

spring-boot-actuator-docs/src/restdoc/java/org/springframework/boot/actuate/hypermedia/SpringBootHypermediaApplication.java

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

1717
package org.springframework.boot.actuate.hypermedia;
1818

19+
import groovy.text.GStringTemplateEngine;
20+
import groovy.text.TemplateEngine;
21+
1922
import org.springframework.boot.SpringApplication;
2023
import org.springframework.boot.autoconfigure.SpringBootApplication;
2124
import org.springframework.context.annotation.Bean;
2225

23-
import groovy.text.GStringTemplateEngine;
24-
import groovy.text.TemplateEngine;
25-
2626
@SpringBootApplication
2727
public class SpringBootHypermediaApplication {
2828

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CacheStatisticsAutoConfiguration.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818

1919
import javax.cache.Caching;
2020

21+
import com.hazelcast.core.IMap;
22+
import com.hazelcast.spring.cache.HazelcastCache;
23+
import net.sf.ehcache.Ehcache;
2124
import org.infinispan.spring.provider.SpringCache;
25+
2226
import org.springframework.boot.actuate.cache.CacheStatistics;
2327
import org.springframework.boot.actuate.cache.CacheStatisticsProvider;
2428
import org.springframework.boot.actuate.cache.ConcurrentMapCacheStatisticsProvider;
@@ -43,11 +47,6 @@
4347
import org.springframework.context.annotation.Bean;
4448
import org.springframework.context.annotation.Configuration;
4549

46-
import com.hazelcast.core.IMap;
47-
import com.hazelcast.spring.cache.HazelcastCache;
48-
49-
import net.sf.ehcache.Ehcache;
50-
5150
/**
5251
* {@link EnableAutoConfiguration Auto-configuration} for {@link CacheStatisticsProvider}
5352
* beans.

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointAutoConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
import java.util.Map;
2626
import java.util.Properties;
2727

28+
import liquibase.integration.spring.SpringLiquibase;
2829
import org.flywaydb.core.Flyway;
30+
2931
import org.springframework.beans.factory.annotation.Autowired;
3032
import org.springframework.beans.factory.annotation.Value;
3133
import org.springframework.boot.actuate.endpoint.AutoConfigurationReportEndpoint;
@@ -67,8 +69,6 @@
6769
import org.springframework.core.io.support.PropertiesLoaderUtils;
6870
import org.springframework.web.servlet.handler.AbstractHandlerMethodMapping;
6971

70-
import liquibase.integration.spring.SpringLiquibase;
71-
7272
/**
7373
* {@link EnableAutoConfiguration Auto-configuration} for common management
7474
* {@link Endpoint}s.

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointMBeanExportAutoConfiguration.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
import javax.management.MBeanServer;
2020

21+
import com.fasterxml.jackson.databind.ObjectMapper;
22+
2123
import org.springframework.beans.factory.annotation.Autowired;
2224
import org.springframework.boot.actuate.autoconfigure.EndpointMBeanExportAutoConfiguration.JmxEnabledCondition;
2325
import org.springframework.boot.actuate.endpoint.Endpoint;
@@ -37,8 +39,6 @@
3739
import org.springframework.core.type.AnnotatedTypeMetadata;
3840
import org.springframework.util.StringUtils;
3941

40-
import com.fasterxml.jackson.databind.ObjectMapper;
41-
4242
/**
4343
* {@link EnableAutoConfiguration Auto-configuration} to enable JMX export for
4444
* {@link Endpoint}s.

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/EndpointWebMvcHypermediaManagementContextConfiguration.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424

2525
import javax.annotation.PostConstruct;
2626

27+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
28+
import com.fasterxml.jackson.annotation.JsonInclude;
29+
import com.fasterxml.jackson.annotation.JsonInclude.Include;
30+
import com.fasterxml.jackson.annotation.JsonUnwrapped;
31+
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
32+
2733
import org.springframework.beans.factory.annotation.Autowired;
2834
import org.springframework.boot.actuate.endpoint.mvc.ActuatorDocsEndpoint;
2935
import org.springframework.boot.actuate.endpoint.mvc.ActuatorHalBrowserEndpoint;
@@ -65,12 +71,6 @@
6571
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
6672
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;
6773

68-
import com.fasterxml.jackson.annotation.JsonAnyGetter;
69-
import com.fasterxml.jackson.annotation.JsonInclude;
70-
import com.fasterxml.jackson.annotation.JsonInclude.Include;
71-
import com.fasterxml.jackson.annotation.JsonUnwrapped;
72-
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
73-
7474
import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
7575

7676
/**

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfiguration.java

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import org.apache.solr.client.solrj.SolrServer;
2626
import org.elasticsearch.client.Client;
27+
2728
import org.springframework.amqp.rabbit.core.RabbitTemplate;
2829
import org.springframework.beans.factory.InitializingBean;
2930
import org.springframework.beans.factory.annotation.Autowired;

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/MetricRepositoryAutoConfiguration.java

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

1717
package org.springframework.boot.actuate.autoconfigure;
1818

19+
import com.codahale.metrics.MetricRegistry;
20+
1921
import org.springframework.beans.factory.annotation.Autowired;
2022
import org.springframework.boot.actuate.metrics.CounterService;
2123
import org.springframework.boot.actuate.metrics.GaugeService;
@@ -40,8 +42,6 @@
4042
import org.springframework.context.annotation.Configuration;
4143
import org.springframework.messaging.MessageChannel;
4244

43-
import com.codahale.metrics.MetricRegistry;
44-
4545
/**
4646
* {@link EnableAutoConfiguration Auto-configuration} for metrics services. Creates
4747
* user-facing {@link GaugeService} and {@link CounterService} instances, and also back

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/MetricsDropwizardAutoConfiguration.java

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

1717
package org.springframework.boot.actuate.autoconfigure;
1818

19+
import com.codahale.metrics.MetricRegistry;
20+
1921
import org.springframework.boot.actuate.endpoint.MetricReaderPublicMetrics;
2022
import org.springframework.boot.actuate.metrics.CounterService;
2123
import org.springframework.boot.actuate.metrics.GaugeService;
@@ -28,8 +30,6 @@
2830
import org.springframework.context.annotation.Bean;
2931
import org.springframework.context.annotation.Configuration;
3032

31-
import com.codahale.metrics.MetricRegistry;
32-
3333
/**
3434
* {@link EnableAutoConfiguration Auto-configuration} for Dropwizard-based metrics.
3535
*

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/AbstractJmxCacheStatisticsProvider.java

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import org.slf4j.Logger;
3232
import org.slf4j.LoggerFactory;
33+
3334
import org.springframework.cache.Cache;
3435
import org.springframework.cache.CacheManager;
3536

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/EhCacheStatisticsProvider.java

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

1717
package org.springframework.boot.actuate.cache;
1818

19+
import net.sf.ehcache.statistics.StatisticsGateway;
20+
1921
import org.springframework.cache.CacheManager;
2022
import org.springframework.cache.ehcache.EhCacheCache;
2123

22-
import net.sf.ehcache.statistics.StatisticsGateway;
23-
2424
/**
2525
* {@link CacheStatisticsProvider} implementation for EhCache.
2626
*

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/GuavaCacheStatisticsProvider.java

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

1717
package org.springframework.boot.actuate.cache;
1818

19+
import com.google.common.cache.CacheStats;
20+
1921
import org.springframework.cache.CacheManager;
2022
import org.springframework.cache.guava.GuavaCache;
2123

22-
import com.google.common.cache.CacheStats;
23-
2424
/**
2525
* {@link CacheStatisticsProvider} implementation for Guava.
2626
*

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/HazelcastCacheStatisticsProvider.java

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

1717
package org.springframework.boot.actuate.cache;
1818

19-
import org.springframework.cache.CacheManager;
20-
2119
import com.hazelcast.core.IMap;
2220
import com.hazelcast.monitor.LocalMapStats;
2321
import com.hazelcast.spring.cache.HazelcastCache;
2422

23+
import org.springframework.cache.CacheManager;
24+
2525
/**
2626
* {@link CacheStatisticsProvider} implementation for Hazelcast.
2727
*

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpoint.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@
2222
import java.util.List;
2323
import java.util.Map;
2424

25-
import org.springframework.beans.BeansException;
26-
import org.springframework.boot.context.properties.ConfigurationBeanFactoryMetaData;
27-
import org.springframework.boot.context.properties.ConfigurationProperties;
28-
import org.springframework.context.ApplicationContext;
29-
import org.springframework.context.ApplicationContextAware;
30-
import org.springframework.util.ClassUtils;
31-
import org.springframework.util.StringUtils;
32-
3325
import com.fasterxml.jackson.databind.BeanDescription;
3426
import com.fasterxml.jackson.databind.ObjectMapper;
3527
import com.fasterxml.jackson.databind.SerializationConfig;
@@ -45,6 +37,14 @@
4537
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
4638
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
4739

40+
import org.springframework.beans.BeansException;
41+
import org.springframework.boot.context.properties.ConfigurationBeanFactoryMetaData;
42+
import org.springframework.boot.context.properties.ConfigurationProperties;
43+
import org.springframework.context.ApplicationContext;
44+
import org.springframework.context.ApplicationContextAware;
45+
import org.springframework.util.ClassUtils;
46+
import org.springframework.util.StringUtils;
47+
4848
/**
4949
* {@link Endpoint} to expose application properties from {@link ConfigurationProperties}
5050
* annotated beans.

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/FlywayEndpoint.java

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.flywaydb.core.api.MigrationInfo;
2525
import org.flywaydb.core.api.MigrationState;
2626
import org.flywaydb.core.api.MigrationType;
27+
2728
import org.springframework.boot.actuate.endpoint.FlywayEndpoint.FlywayMigration;
2829
import org.springframework.boot.context.properties.ConfigurationProperties;
2930
import org.springframework.util.Assert;

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/LiquibaseEndpoint.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121

2222
import javax.sql.DataSource;
2323

24-
import org.springframework.boot.context.properties.ConfigurationProperties;
25-
import org.springframework.util.Assert;
26-
2724
import liquibase.changelog.StandardChangeLogHistoryService;
2825
import liquibase.database.Database;
2926
import liquibase.database.DatabaseFactory;
3027
import liquibase.database.jvm.JdbcConnection;
3128
import liquibase.integration.spring.SpringLiquibase;
3229

30+
import org.springframework.boot.context.properties.ConfigurationProperties;
31+
import org.springframework.util.Assert;
32+
3333
/**
3434
* {@link Endpoint} to expose liquibase info.
3535
*

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/DataEndpointMBean.java

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

1717
package org.springframework.boot.actuate.endpoint.jmx;
1818

19+
import com.fasterxml.jackson.databind.ObjectMapper;
20+
1921
import org.springframework.boot.actuate.endpoint.Endpoint;
2022
import org.springframework.jmx.export.annotation.ManagedAttribute;
2123
import org.springframework.jmx.export.annotation.ManagedResource;
2224

23-
import com.fasterxml.jackson.databind.ObjectMapper;
24-
2525
/**
2626
* Simple wrapper around {@link Endpoint} implementations that provide actuator data of
2727
* some sort.

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBeanExporter.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import javax.management.MalformedObjectNameException;
2727
import javax.management.ObjectName;
2828

29+
import com.fasterxml.jackson.databind.ObjectMapper;
2930
import org.apache.commons.logging.Log;
3031
import org.apache.commons.logging.LogFactory;
3132

@@ -49,8 +50,6 @@
4950
import org.springframework.jmx.support.ObjectNameManager;
5051
import org.springframework.util.ObjectUtils;
5152

52-
import com.fasterxml.jackson.databind.ObjectMapper;
53-
5453
/**
5554
* {@link ApplicationListener} that registers all known {@link Endpoint}s with an
5655
* {@link MBeanServer} using the {@link MBeanExporter} located from the application

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/ShutdownEndpointMBean.java

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

1717
package org.springframework.boot.actuate.endpoint.jmx;
1818

19+
import com.fasterxml.jackson.databind.ObjectMapper;
20+
1921
import org.springframework.boot.actuate.endpoint.Endpoint;
2022
import org.springframework.boot.actuate.endpoint.ShutdownEndpoint;
2123
import org.springframework.jmx.export.annotation.ManagedOperation;
2224
import org.springframework.jmx.export.annotation.ManagedResource;
2325

24-
import com.fasterxml.jackson.databind.ObjectMapper;
25-
2626
/**
2727
* Special endpoint wrapper for {@link ShutdownEndpoint}.
2828
*

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/LogFileMvcEndpoint.java

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import org.apache.commons.logging.Log;
2525
import org.apache.commons.logging.LogFactory;
26+
2627
import org.springframework.boot.actuate.endpoint.Endpoint;
2728
import org.springframework.boot.context.properties.ConfigurationProperties;
2829
import org.springframework.boot.logging.LogFile;

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/health/CassandraHealthIndicator.java

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

1717
package org.springframework.boot.actuate.health;
1818

19-
import org.springframework.data.cassandra.core.CassandraAdminOperations;
20-
import org.springframework.util.Assert;
21-
2219
import com.datastax.driver.core.ResultSet;
2320
import com.datastax.driver.core.querybuilder.QueryBuilder;
2421
import com.datastax.driver.core.querybuilder.Select;
2522

23+
import org.springframework.data.cassandra.core.CassandraAdminOperations;
24+
import org.springframework.util.Assert;
25+
2626
/**
2727
* Simple implementation of a {@link HealthIndicator} returning status information for
2828
* Cassandra data stores.

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/dropwizard/DropwizardMetricServices.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
import java.util.concurrent.ConcurrentMap;
2121
import java.util.concurrent.TimeUnit;
2222

23-
import org.springframework.boot.actuate.metrics.CounterService;
24-
import org.springframework.boot.actuate.metrics.GaugeService;
25-
2623
import com.codahale.metrics.Counter;
2724
import com.codahale.metrics.Gauge;
2825
import com.codahale.metrics.Histogram;
2926
import com.codahale.metrics.Meter;
3027
import com.codahale.metrics.MetricRegistry;
3128
import com.codahale.metrics.Timer;
3229

30+
import org.springframework.boot.actuate.metrics.CounterService;
31+
import org.springframework.boot.actuate.metrics.GaugeService;
32+
3333
/**
3434
* A {@link GaugeService} and {@link CounterService} that sends data to a Dropwizard
3535
* {@link MetricRegistry} based on a naming convention.

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/export/AbstractMetricExporter.java

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
import org.apache.commons.logging.Log;
2626
import org.apache.commons.logging.LogFactory;
27+
2728
import org.springframework.boot.actuate.metrics.Metric;
2829
import org.springframework.util.StringUtils;
2930

0 commit comments

Comments
 (0)