Commit ed973536 authored by Phillip Webb's avatar Phillip Webb

Apply source cleanup and formatting

parent 80f2336f
...@@ -22,9 +22,9 @@ import java.util.Map; ...@@ -22,9 +22,9 @@ import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.endpoint.AutoConfigurationReportEndpoint.Report; import org.springframework.boot.actuate.endpoint.AutoConfigurationReportEndpoint.Report;
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport; import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport;
import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcome; import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcome;
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes; import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes;
import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Condition; import org.springframework.context.annotation.Condition;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
......
...@@ -31,7 +31,8 @@ public class MetricCopyExporterTests { ...@@ -31,7 +31,8 @@ public class MetricCopyExporterTests {
private final InMemoryMetricRepository writer = new InMemoryMetricRepository(); private final InMemoryMetricRepository writer = new InMemoryMetricRepository();
private final InMemoryMetricRepository reader = new InMemoryMetricRepository(); private final InMemoryMetricRepository reader = new InMemoryMetricRepository();
private final MetricCopyExporter exporter = new MetricCopyExporter(this.reader, this.writer); private final MetricCopyExporter exporter = new MetricCopyExporter(this.reader,
this.writer);
@Test @Test
public void export() { public void export() {
......
...@@ -31,7 +31,8 @@ public class RichGaugeExporterTests { ...@@ -31,7 +31,8 @@ public class RichGaugeExporterTests {
private final InMemoryRichGaugeRepository reader = new InMemoryRichGaugeRepository(); private final InMemoryRichGaugeRepository reader = new InMemoryRichGaugeRepository();
private final InMemoryMetricRepository writer = new InMemoryMetricRepository(); private final InMemoryMetricRepository writer = new InMemoryMetricRepository();
private final RichGaugeExporter exporter = new RichGaugeExporter(this.reader, this.writer); private final RichGaugeExporter exporter = new RichGaugeExporter(this.reader,
this.writer);
@Test @Test
public void prefixedMetricsCopied() { public void prefixedMetricsCopied() {
......
...@@ -30,7 +30,8 @@ public class DefaultCounterServiceTests { ...@@ -30,7 +30,8 @@ public class DefaultCounterServiceTests {
private final MetricWriter repository = mock(MetricWriter.class); private final MetricWriter repository = mock(MetricWriter.class);
private final DefaultCounterService service = new DefaultCounterService(this.repository); private final DefaultCounterService service = new DefaultCounterService(
this.repository);
@Test @Test
public void incrementPrependsCounter() { public void incrementPrependsCounter() {
......
...@@ -21,7 +21,7 @@ import java.util.List; ...@@ -21,7 +21,7 @@ import java.util.List;
import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.GenericBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar; import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
...@@ -65,7 +65,7 @@ public abstract class AutoConfigurationPackages { ...@@ -65,7 +65,7 @@ public abstract class AutoConfigurationPackages {
beanDefinition.setBeanClass(BasePackage.class); beanDefinition.setBeanClass(BasePackage.class);
beanDefinition.getConstructorArgumentValues().addIndexedArgumentValue(0, beanDefinition.getConstructorArgumentValues().addIndexedArgumentValue(0,
packageName); packageName);
beanDefinition.setRole(AbstractBeanDefinition.ROLE_INFRASTRUCTURE); beanDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
registry.registerBeanDefinition(BEAN, beanDefinition); registry.registerBeanDefinition(BEAN, beanDefinition);
} }
......
...@@ -76,8 +76,8 @@ public abstract class SpringBootCondition implements Condition { ...@@ -76,8 +76,8 @@ public abstract class SpringBootCondition implements Condition {
return message; return message;
} }
private void recordEvaluation(ConditionContext context, private void recordEvaluation(ConditionContext context, String classOrMethodName,
String classOrMethodName, ConditionOutcome outcome) { ConditionOutcome outcome) {
if (context.getBeanFactory() != null) { if (context.getBeanFactory() != null) {
ConditionEvaluationReport.get(context.getBeanFactory()) ConditionEvaluationReport.get(context.getBeanFactory())
.recordConditionEvaluation(classOrMethodName, this, outcome); .recordConditionEvaluation(classOrMethodName, this, outcome);
......
...@@ -29,8 +29,6 @@ import org.mockito.MockitoAnnotations; ...@@ -29,8 +29,6 @@ import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.annotation.Configurable; import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport;
import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcome; import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcome;
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes; import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes;
import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration; import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration;
......
...@@ -32,7 +32,6 @@ import org.mockito.stubbing.Answer; ...@@ -32,7 +32,6 @@ import org.mockito.stubbing.Answer;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration; import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport; import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport;
import org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer;
import org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
import org.springframework.boot.event.ApplicationFailedEvent; import org.springframework.boot.event.ApplicationFailedEvent;
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.cli.command; package org.springframework.boot.cli.command;
/** /**
* Exception used to indicate that no arguemnts were specified. * Exception used to indicate that no arguemnts were specified.
* *
......
...@@ -31,8 +31,6 @@ import java.util.Map; ...@@ -31,8 +31,6 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
import org.springframework.boot.cli.command.OptionParsingCommand;
import joptsimple.BuiltinHelpFormatter; import joptsimple.BuiltinHelpFormatter;
import joptsimple.HelpFormatter; import joptsimple.HelpFormatter;
import joptsimple.OptionDescriptor; import joptsimple.OptionDescriptor;
...@@ -40,6 +38,8 @@ import joptsimple.OptionParser; ...@@ -40,6 +38,8 @@ import joptsimple.OptionParser;
import joptsimple.OptionSet; import joptsimple.OptionSet;
import joptsimple.OptionSpecBuilder; import joptsimple.OptionSpecBuilder;
import org.springframework.boot.cli.command.OptionParsingCommand;
/** /**
* Delegate used by {@link OptionParsingCommand} to parse options and run the command. * Delegate used by {@link OptionParsingCommand} to parse options and run the command.
* *
......
...@@ -18,7 +18,6 @@ package org.springframework.boot.cli.command; ...@@ -18,7 +18,6 @@ package org.springframework.boot.cli.command;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.springframework.boot.cli.command.CommandRunner;
import org.springframework.boot.cli.command.run.RunCommand; import org.springframework.boot.cli.command.run.RunCommand;
import org.springframework.boot.cli.util.OutputCapture; import org.springframework.boot.cli.util.OutputCapture;
......
...@@ -42,7 +42,6 @@ import org.codehaus.groovy.control.io.ReaderSource; ...@@ -42,7 +42,6 @@ import org.codehaus.groovy.control.io.ReaderSource;
import org.codehaus.groovy.transform.ASTTransformation; import org.codehaus.groovy.transform.ASTTransformation;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.boot.cli.compiler.ResolveDependencyCoordinatesTransformation;
import org.springframework.boot.cli.compiler.dependencies.ArtifactCoordinatesResolver; import org.springframework.boot.cli.compiler.dependencies.ArtifactCoordinatesResolver;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
......
...@@ -18,7 +18,6 @@ package org.springframework.boot.cli.compiler.dependencies; ...@@ -18,7 +18,6 @@ package org.springframework.boot.cli.compiler.dependencies;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.boot.cli.compiler.dependencies.ManagedDependenciesArtifactCoordinatesResolver;
import org.springframework.boot.dependency.tools.Dependency; import org.springframework.boot.dependency.tools.Dependency;
import org.springframework.boot.dependency.tools.ManagedDependencies; import org.springframework.boot.dependency.tools.ManagedDependencies;
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
package sample.data.mongo; package sample.data.mongo;
import static org.junit.Assert.assertTrue;
import java.net.ConnectException; import java.net.ConnectException;
import org.junit.Rule; import org.junit.Rule;
...@@ -25,6 +23,8 @@ import org.junit.Test; ...@@ -25,6 +23,8 @@ import org.junit.Test;
import org.springframework.boot.test.OutputCapture; import org.springframework.boot.test.OutputCapture;
import org.springframework.core.NestedCheckedException; import org.springframework.core.NestedCheckedException;
import static org.junit.Assert.assertTrue;
/** /**
* Tests for {@link SampleMongoApplication}. * Tests for {@link SampleMongoApplication}.
* *
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
package sample.secure; package sample.secure;
import static org.junit.Assert.assertEquals;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
...@@ -37,6 +35,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; ...@@ -37,6 +35,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import sample.secure.SampleSecureApplicationTests.TestConfiguration; import sample.secure.SampleSecureApplicationTests.TestConfiguration;
import static org.junit.Assert.assertEquals;
/** /**
* Basic integration tests for demo application. * Basic integration tests for demo application.
* *
...@@ -57,9 +57,10 @@ public class SampleSecureApplicationTests { ...@@ -57,9 +57,10 @@ public class SampleSecureApplicationTests {
@Before @Before
public void init() { public void init() {
AuthenticationManager authenticationManager = context.getBean(AuthenticationManager.class); AuthenticationManager authenticationManager = context
authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken( .getBean(AuthenticationManager.class);
"user", "password")); authentication = authenticationManager
.authenticate(new UsernamePasswordAuthenticationToken("user", "password"));
} }
@After @After
......
...@@ -38,7 +38,6 @@ import org.springframework.http.client.ClientHttpResponse; ...@@ -38,7 +38,6 @@ import org.springframework.http.client.ClientHttpResponse;
import org.springframework.web.client.DefaultResponseErrorHandler; import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import sample.ui.secure.SampleSecureApplication;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
......
...@@ -29,7 +29,7 @@ import org.springframework.boot.gradle.task.RunApp; ...@@ -29,7 +29,7 @@ import org.springframework.boot.gradle.task.RunApp;
/** /**
* Gradle 'Spring Boot' {@link Plugin}. * Gradle 'Spring Boot' {@link Plugin}.
* *
* @author Phillip Webb * @author Phillip Webb
* @author Dave Syer * @author Dave Syer
*/ */
...@@ -59,7 +59,8 @@ public class SpringBootPlugin implements Plugin<Project> { ...@@ -59,7 +59,8 @@ public class SpringBootPlugin implements Plugin<Project> {
private void applyRun(Project project) { private void applyRun(Project project) {
addRunAppTask(project); addRunAppTask(project);
// register BootRepackage so that we can use task foo(type: BootRepackage) {} // register BootRepackage so that we can use task foo(type: BootRepackage) {}
project.getExtensions().getExtraProperties().set("BootRepackage", Repackage.class); project.getExtensions().getExtraProperties()
.set("BootRepackage", Repackage.class);
} }
private void applyResolutionStrategy(Project project) { private void applyResolutionStrategy(Project project) {
...@@ -80,14 +81,16 @@ public class SpringBootPlugin implements Plugin<Project> { ...@@ -80,14 +81,16 @@ public class SpringBootPlugin implements Plugin<Project> {
+ "archives so that they can be executed from the command " + "archives so that they can be executed from the command "
+ "line using 'java -jar'"); + "line using 'java -jar'");
packageTask.setGroup(BasePlugin.BUILD_GROUP); packageTask.setGroup(BasePlugin.BUILD_GROUP);
packageTask.dependsOn(project.getConfigurations().getByName( packageTask.dependsOn(project.getConfigurations()
Dependency.ARCHIVES_CONFIGURATION).getAllArtifacts().getBuildDependencies()); .getByName(Dependency.ARCHIVES_CONFIGURATION).getAllArtifacts()
.getBuildDependencies());
return packageTask; return packageTask;
} }
private void addRunAppTask(Project project) { private void addRunAppTask(Project project) {
RunApp runJarTask = project.getTasks().create(RUN_APP_TASK_NAME, RunApp.class); RunApp runJarTask = project.getTasks().create(RUN_APP_TASK_NAME, RunApp.class);
runJarTask.setDescription("Run the project with support for auto-detecting main class and reloading static resources"); runJarTask.setDescription("Run the project with support for "
+ "auto-detecting main class and reloading static resources");
runJarTask.setGroup("Execution"); runJarTask.setGroup("Execution");
runJarTask.dependsOn("assemble"); runJarTask.dependsOn("assemble");
} }
......
package org.springframework.boot.gradle; package org.springframework.boot.gradle;
import org.gradle.api.Action; import org.gradle.api.Action;
...@@ -11,7 +10,7 @@ import org.springframework.boot.dependency.tools.ManagedDependencies; ...@@ -11,7 +10,7 @@ import org.springframework.boot.dependency.tools.ManagedDependencies;
/** /**
* A resolution strategy to resolve missing version numbers using the * A resolution strategy to resolve missing version numbers using the
* 'spring-boot-dependencies' POM. * 'spring-boot-dependencies' POM.
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
public class SpringBootResolutionStrategy { public class SpringBootResolutionStrategy {
......
...@@ -64,16 +64,18 @@ class ProjectLibraries implements Libraries { ...@@ -64,16 +64,18 @@ class ProjectLibraries implements Libraries {
@Override @Override
public void doWithLibraries(LibraryCallback callback) throws IOException { public void doWithLibraries(LibraryCallback callback) throws IOException {
FileCollection custom = this.customConfigurationName != null ? this.project.getConfigurations().findByName( FileCollection custom = this.customConfigurationName != null ? this.project
this.customConfigurationName) .getConfigurations().findByName(this.customConfigurationName) : null;
: null;
if (custom != null) { if (custom != null) {
libraries(LibraryScope.CUSTOM, custom, callback); libraries(LibraryScope.CUSTOM, custom, callback);
} else { }
FileCollection compile = this.project.getConfigurations().getByName("compile"); else {
FileCollection compile = this.project.getConfigurations()
.getByName("compile");
FileCollection runtime = this.project.getConfigurations().getByName("runtime"); FileCollection runtime = this.project.getConfigurations()
.getByName("runtime");
runtime = runtime.minus(compile); runtime = runtime.minus(compile);
FileCollection provided = this.project.getConfigurations().findByName( FileCollection provided = this.project.getConfigurations().findByName(
...@@ -98,4 +100,5 @@ class ProjectLibraries implements Libraries { ...@@ -98,4 +100,5 @@ class ProjectLibraries implements Libraries {
} }
} }
} }
} }
...@@ -60,7 +60,8 @@ public class Repackage extends DefaultTask { ...@@ -60,7 +60,8 @@ public class Repackage extends DefaultTask {
} }
if (this.customConfiguration != null) { if (this.customConfiguration != null) {
libraries.setCustomConfigurationName(this.customConfiguration); libraries.setCustomConfigurationName(this.customConfiguration);
} else if (extension.getCustomConfiguration() != null) { }
else if (extension.getCustomConfiguration() != null) {
libraries.setCustomConfigurationName(extension.getCustomConfiguration()); libraries.setCustomConfigurationName(extension.getCustomConfiguration());
} }
project.getTasks().withType(Jar.class, new Action<Jar>() { project.getTasks().withType(Jar.class, new Action<Jar>() {
...@@ -85,12 +86,14 @@ public class Repackage extends DefaultTask { ...@@ -85,12 +86,14 @@ public class Repackage extends DefaultTask {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
try { try {
return super.findMainMethod(source); return super.findMainMethod(source);
} finally { }
finally {
long duration = System.currentTimeMillis() long duration = System.currentTimeMillis()
- startTime; - startTime;
if (duration > FIND_WARNING_TIMEOUT) { if (duration > FIND_WARNING_TIMEOUT) {
getLogger().warn( getLogger()
"Searching for the main-class is taking some time, " .warn("Searching for the "
+ "main-class is taking some time, "
+ "consider using setting 'springBoot.mainClass'"); + "consider using setting 'springBoot.mainClass'");
} }
} }
...@@ -103,7 +106,8 @@ public class Repackage extends DefaultTask { ...@@ -103,7 +106,8 @@ public class Repackage extends DefaultTask {
repackager.setBackupSource(extension.isBackupSource()); repackager.setBackupSource(extension.isBackupSource());
try { try {
repackager.repackage(libraries); repackager.repackage(libraries);
} catch (IOException ex) { }
catch (IOException ex) {
throw new IllegalStateException(ex.getMessage(), ex); throw new IllegalStateException(ex.getMessage(), ex);
} }
} }
...@@ -111,4 +115,5 @@ public class Repackage extends DefaultTask { ...@@ -111,4 +115,5 @@ public class Repackage extends DefaultTask {
} }
}); });
} }
} }
...@@ -36,7 +36,7 @@ import org.springframework.boot.loader.tools.MainClassFinder; ...@@ -36,7 +36,7 @@ import org.springframework.boot.loader.tools.MainClassFinder;
/** /**
* Run the project from Gradle. * Run the project from Gradle.
* *
* @author Dave Syer * @author Dave Syer
*/ */
public class RunApp extends DefaultTask { public class RunApp extends DefaultTask {
...@@ -54,15 +54,15 @@ public class RunApp extends DefaultTask { ...@@ -54,15 +54,15 @@ public class RunApp extends DefaultTask {
@Override @Override
public void execute(SourceSet set) { public void execute(SourceSet set) {
if (SourceSet.MAIN_SOURCE_SET_NAME.equals(set.getName())) { if (SourceSet.MAIN_SOURCE_SET_NAME.equals(set.getName())) {
main = set; RunApp.this.main = set;
} }
}; };
}); });
final Set<File> allResources = new LinkedHashSet<File>(); final Set<File> allResources = new LinkedHashSet<File>();
if (main != null) { if (this.main != null) {
SourceDirectorySet resources = main.getResources(); SourceDirectorySet resources = this.main.getResources();
allResources.addAll(resources.getSrcDirs()); allResources.addAll(resources.getSrcDirs());
} }
...@@ -70,13 +70,13 @@ public class RunApp extends DefaultTask { ...@@ -70,13 +70,13 @@ public class RunApp extends DefaultTask {
@Override @Override
public void execute(JavaExec exec) { public void execute(JavaExec exec) {
ArrayList<File> files = new ArrayList<File>( ArrayList<File> files = new ArrayList<File>(exec.getClasspath()
exec.getClasspath().getFiles()); .getFiles());
files.addAll(0, allResources); files.addAll(0, allResources);
getLogger().info("Adding classpath: " + allResources); getLogger().info("Adding classpath: " + allResources);
exec.setClasspath(new SimpleFileCollection(files)); exec.setClasspath(new SimpleFileCollection(files));
if (exec.getMain() == null) { if (exec.getMain() == null) {
final String mainClass = findMainClass(main); final String mainClass = findMainClass(RunApp.this.main);
exec.setMain(mainClass); exec.setMain(mainClass);
exec.getConventionMapping().map("main", new Callable<String>() { exec.getConventionMapping().map("main", new Callable<String>() {
...@@ -84,6 +84,7 @@ public class RunApp extends DefaultTask { ...@@ -84,6 +84,7 @@ public class RunApp extends DefaultTask {
public String call() throws Exception { public String call() throws Exception {
return mainClass; return mainClass;
} }
}); });
getLogger().info("Found main: " + mainClass); getLogger().info("Found main: " + mainClass);
} }
...@@ -100,7 +101,8 @@ public class RunApp extends DefaultTask { ...@@ -100,7 +101,8 @@ public class RunApp extends DefaultTask {
getLogger().info("Looking for main in: " + main.getOutput().getClassesDir()); getLogger().info("Looking for main in: " + main.getOutput().getClassesDir());
try { try {
return MainClassFinder.findMainClass(main.getOutput().getClassesDir()); return MainClassFinder.findMainClass(main.getOutput().getClassesDir());
} catch (IOException ex) { }
catch (IOException ex) {
throw new IllegalStateException("Cannot find main class", ex); throw new IllegalStateException("Cannot find main class", ex);
} }
} }
......
...@@ -24,9 +24,9 @@ import java.util.Set; ...@@ -24,9 +24,9 @@ import java.util.Set;
import org.springframework.boot.yaml.DefaultProfileDocumentMatcher; import org.springframework.boot.yaml.DefaultProfileDocumentMatcher;
import org.springframework.boot.yaml.SpringProfileDocumentMatcher; import org.springframework.boot.yaml.SpringProfileDocumentMatcher;
import org.springframework.boot.yaml.YamlPropertiesFactoryBean;
import org.springframework.boot.yaml.YamlProcessor.DocumentMatcher; import org.springframework.boot.yaml.YamlProcessor.DocumentMatcher;
import org.springframework.boot.yaml.YamlProcessor.MatchStatus; import org.springframework.boot.yaml.YamlProcessor.MatchStatus;
import org.springframework.boot.yaml.YamlPropertiesFactoryBean;
import org.springframework.core.env.PropertySource; import org.springframework.core.env.PropertySource;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
......
...@@ -18,7 +18,6 @@ package org.springframework.boot.cloudfoundry; ...@@ -18,7 +18,6 @@ package org.springframework.boot.cloudfoundry;
import org.junit.Test; import org.junit.Test;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.cloudfoundry.VcapApplicationListener;
import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.boot.test.EnvironmentTestUtils;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
......
...@@ -24,9 +24,6 @@ import org.junit.Rule; ...@@ -24,9 +24,6 @@ import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.config.ConfigFileApplicationListener;
import org.springframework.boot.config.PropertySourceLoader;
import org.springframework.boot.config.PropertySourceLoadersFactory;
import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.boot.test.EnvironmentTestUtils;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
package org.springframework.boot.context; package org.springframework.boot.context;
import org.junit.Test; import org.junit.Test;
import org.springframework.boot.context.ContextIdApplicationContextInitializer;
import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.boot.test.EnvironmentTestUtils;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
......
...@@ -19,7 +19,6 @@ package org.springframework.boot.context; ...@@ -19,7 +19,6 @@ package org.springframework.boot.context;
import org.junit.Assume; import org.junit.Assume;
import org.junit.Test; import org.junit.Test;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.FileEncodingApplicationListener;
import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.boot.test.EnvironmentTestUtils;
import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.ConfigurableEnvironment;
......
...@@ -19,7 +19,6 @@ package org.springframework.boot.context.env; ...@@ -19,7 +19,6 @@ package org.springframework.boot.context.env;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;
import org.springframework.boot.context.env.EnvironmentDelegateApplicationContextInitializer;
import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.boot.test.EnvironmentTestUtils;
import org.springframework.context.ApplicationContextException; import org.springframework.context.ApplicationContextException;
import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ApplicationContextInitializer;
......
...@@ -21,7 +21,6 @@ import org.junit.Rule; ...@@ -21,7 +21,6 @@ import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.env.EnvironmentDelegateApplicationListener;
import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.boot.test.EnvironmentTestUtils;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
......
...@@ -16,9 +16,6 @@ ...@@ -16,9 +16,6 @@
package org.springframework.boot.json; package org.springframework.boot.json;
import org.springframework.boot.json.JacksonJsonParser;
import org.springframework.boot.json.JsonParser;
/** /**
* Tests for {@link JsonParser}. * Tests for {@link JsonParser}.
* *
......
...@@ -20,8 +20,6 @@ import java.util.List; ...@@ -20,8 +20,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.junit.Test; import org.junit.Test;
import org.springframework.boot.json.JsonParser;
import org.springframework.boot.json.SimpleJsonParser;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
......
...@@ -16,9 +16,6 @@ ...@@ -16,9 +16,6 @@
package org.springframework.boot.json; package org.springframework.boot.json;
import org.springframework.boot.json.JsonParser;
import org.springframework.boot.json.YamlJsonParser;
/** /**
* Tests for {@link YamlJsonParser}. * Tests for {@link YamlJsonParser}.
* *
......
...@@ -30,8 +30,6 @@ import org.junit.Test; ...@@ -30,8 +30,6 @@ import org.junit.Test;
import org.junit.rules.TemporaryFolder; import org.junit.rules.TemporaryFolder;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.event.ApplicationStartedEvent; import org.springframework.boot.event.ApplicationStartedEvent;
import org.springframework.boot.logging.LogLevel;
import org.springframework.boot.logging.LoggingApplicationListener;
import org.springframework.boot.logging.java.JavaLoggingSystem; import org.springframework.boot.logging.java.JavaLoggingSystem;
import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.boot.test.EnvironmentTestUtils;
import org.springframework.boot.test.OutputCapture; import org.springframework.boot.test.OutputCapture;
......
...@@ -20,7 +20,6 @@ import java.io.IOException; ...@@ -20,7 +20,6 @@ import java.io.IOException;
import java.util.Properties; import java.util.Properties;
import org.junit.Test; import org.junit.Test;
import org.springframework.boot.yaml.ArrayDocumentMatcher;
import org.springframework.boot.yaml.YamlProcessor.MatchStatus; import org.springframework.boot.yaml.YamlProcessor.MatchStatus;
import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.core.io.support.PropertiesLoaderUtils;
......
...@@ -22,7 +22,6 @@ import java.util.LinkedHashMap; ...@@ -22,7 +22,6 @@ import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import org.junit.Test; import org.junit.Test;
import org.springframework.boot.yaml.YamlMapFactoryBean;
import org.springframework.boot.yaml.YamlProcessor.ResolutionMethod; import org.springframework.boot.yaml.YamlProcessor.ResolutionMethod;
import org.springframework.core.io.AbstractResource; import org.springframework.core.io.AbstractResource;
import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.ByteArrayResource;
......
...@@ -21,7 +21,6 @@ import java.util.Properties; ...@@ -21,7 +21,6 @@ import java.util.Properties;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;
import org.springframework.boot.yaml.YamlProcessor;
import org.springframework.boot.yaml.YamlProcessor.MatchCallback; import org.springframework.boot.yaml.YamlProcessor.MatchCallback;
import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
......
...@@ -24,7 +24,6 @@ import org.junit.Ignore; ...@@ -24,7 +24,6 @@ import org.junit.Ignore;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;
import org.springframework.boot.yaml.YamlPropertiesFactoryBean;
import org.springframework.boot.yaml.YamlProcessor.DocumentMatcher; import org.springframework.boot.yaml.YamlProcessor.DocumentMatcher;
import org.springframework.boot.yaml.YamlProcessor.MatchStatus; import org.springframework.boot.yaml.YamlProcessor.MatchStatus;
import org.springframework.boot.yaml.YamlProcessor.ResolutionMethod; import org.springframework.boot.yaml.YamlProcessor.ResolutionMethod;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment