Format with Eclipse Oxygen SR2

This commit is contained in:
Andy Wilkinson
2018-02-08 10:53:53 +00:00
parent b4f4dd3fdd
commit 76a450dfba
126 changed files with 556 additions and 611 deletions

View File

@@ -52,8 +52,8 @@ import java.util.List;
* Each stringer may be used to encode a single top level value. Instances of this class
* are not thread safe. Although this class is nonfinal, it was not designed for
* inheritance and should not be subclassed. In particular, self-use by overrideable
* methods is not specified. See <i>Effective Java</i> Item 17,
* "Design and Document or inheritance or else prohibit it" for further information.
* methods is not specified. See <i>Effective Java</i> Item 17, "Design and Document or
* inheritance or else prohibit it" for further information.
*/
public class JSONStringer {

View File

@@ -54,8 +54,8 @@ package org.springframework.boot.configurationprocessor.json;
* Each tokener may be used to parse a single JSON string. Instances of this class are not
* thread safe. Although this class is nonfinal, it was not designed for inheritance and
* should not be subclassed. In particular, self-use by overrideable methods is not
* specified. See <i>Effective Java</i> Item 17,
* "Design and Document or inheritance or else prohibit it" for further information.
* specified. See <i>Effective Java</i> Item 17, "Design and Document or inheritance or
* else prohibit it" for further information.
*/
public class JSONTokener {

View File

@@ -349,10 +349,10 @@ public class ConfigurationMetadataAnnotationProcessorTests {
.fromSource(
org.springframework.boot.configurationsample.method.DeprecatedClassMethodConfig.Foo.class)
.withDeprecation(null, null));
assertThat(metadata).has(
Metadata.withProperty("foo.flag", Boolean.class).withDefaultValue(false)
.fromSource(
org.springframework.boot.configurationsample.method.DeprecatedClassMethodConfig.Foo.class)
assertThat(metadata).has(Metadata.withProperty("foo.flag", Boolean.class)
.withDefaultValue(false)
.fromSource(
org.springframework.boot.configurationsample.method.DeprecatedClassMethodConfig.Foo.class)
.withDeprecation(null, null));
}
@@ -419,18 +419,14 @@ public class ConfigurationMetadataAnnotationProcessorTests {
ConfigurationMetadata metadata = compile(ClassWithNestedProperties.class);
assertThat(metadata).has(Metadata.withGroup("nestedChildProps")
.fromSource(ClassWithNestedProperties.NestedChildClass.class));
assertThat(metadata)
.has(Metadata
.withProperty("nestedChildProps.child-class-property",
Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(20));
assertThat(metadata)
.has(Metadata
.withProperty("nestedChildProps.parent-class-property",
Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(10));
assertThat(metadata).has(Metadata
.withProperty("nestedChildProps.child-class-property", Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(20));
assertThat(metadata).has(Metadata
.withProperty("nestedChildProps.parent-class-property", Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(10));
}
@Test
@@ -830,14 +826,11 @@ public class ConfigurationMetadataAnnotationProcessorTests {
@Test
public void mergingOfHintWithProvider() throws Exception {
writeAdditionalHints(
new ItemHint("simple.theName",
Collections
.emptyList(),
Arrays.asList(
new ItemHint.ValueProvider("first",
Collections.singletonMap("target", "org.foo")),
new ItemHint.ValueProvider("second", null))));
writeAdditionalHints(new ItemHint("simple.theName", Collections.emptyList(),
Arrays.asList(
new ItemHint.ValueProvider("first",
Collections.singletonMap("target", "org.foo")),
new ItemHint.ValueProvider("second", null))));
ConfigurationMetadata metadata = compile(SimpleProperties.class);
assertThat(metadata).has(Metadata.withProperty("simple.the-name", String.class)
.fromSource(SimpleProperties.class)

View File

@@ -32,7 +32,7 @@ public class EnabledEndpoint {
}
@ReadOperation
public String retrieve(String parameter, Integer anotherParameter) {
public String retrieve(String parameter, Integer anotherParameter) {
return "not a main read operation";
}

View File

@@ -177,8 +177,8 @@ final class JavaPluginAction implements PluginApplicationAction {
SourceSet sourceSet) {
String locations = StringUtils
.collectionToCommaDelimitedString(sourceSet.getResources().getSrcDirs());
compile.getOptions().getCompilerArgs()
.add("-Aorg.springframework.boot.configurationprocessor.additionalMetadataLocations="
compile.getOptions().getCompilerArgs().add(
"-Aorg.springframework.boot.configurationprocessor.additionalMetadataLocations="
+ locations);
}

View File

@@ -57,7 +57,8 @@ public class BuildInfo extends ConventionTask {
new File(getDestinationDir(), "build-info.properties"))
.writeBuildProperties(new ProjectDetails(
this.properties.getGroup(),
this.properties.getArtifact() == null ? "unspecified"
this.properties.getArtifact() == null
? "unspecified"
: this.properties.getArtifact(),
this.properties.getVersion(),
this.properties.getName(), coerceToStringValues(

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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.
@@ -50,8 +50,8 @@ public class BootWar extends War implements BootArchive {
*/
public BootWar() {
getWebInf().into("lib-provided",
(copySpec) -> copySpec
.from((Callable<Iterable<File>>) () -> this.providedClasspath == null
(copySpec) -> copySpec.from(
(Callable<Iterable<File>>) () -> this.providedClasspath == null
? Collections.emptyList() : this.providedClasspath));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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.
@@ -40,8 +40,8 @@ public class IntegratingWithActuatorDocumentationTests {
@Test
public void basicBuildInfo() throws IOException {
this.gradleBuild
.script("src/main/gradle/integrating-with-actuator/build-info-basic.gradle")
this.gradleBuild.script(
"src/main/gradle/integrating-with-actuator/build-info-basic.gradle")
.build("bootBuildInfo");
assertThat(new File(this.gradleBuild.getProjectDir(),
"build/resources/main/META-INF/build-info.properties")).isFile();
@@ -49,8 +49,8 @@ public class IntegratingWithActuatorDocumentationTests {
@Test
public void buildInfoCustomValues() throws IOException {
this.gradleBuild
.script("src/main/gradle/integrating-with-actuator/build-info-custom-values.gradle")
this.gradleBuild.script(
"src/main/gradle/integrating-with-actuator/build-info-custom-values.gradle")
.build("bootBuildInfo");
File file = new File(this.gradleBuild.getProjectDir(),
"build/resources/main/META-INF/build-info.properties");
@@ -64,8 +64,8 @@ public class IntegratingWithActuatorDocumentationTests {
@Test
public void buildInfoAdditional() throws IOException {
this.gradleBuild
.script("src/main/gradle/integrating-with-actuator/build-info-additional.gradle")
this.gradleBuild.script(
"src/main/gradle/integrating-with-actuator/build-info-additional.gradle")
.build("bootBuildInfo");
File file = new File(this.gradleBuild.getProjectDir(),
"build/resources/main/META-INF/build-info.properties");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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.
@@ -148,8 +148,8 @@ public class PackagingDocumentationTests {
@Test
public void bootJarLaunchScriptProperties() throws IOException {
this.gradleBuild
.script("src/main/gradle/packaging/boot-jar-launch-script-properties.gradle")
this.gradleBuild.script(
"src/main/gradle/packaging/boot-jar-launch-script-properties.gradle")
.build("bootJar");
File file = new File(this.gradleBuild.getProjectDir(),
"build/libs/" + this.gradleBuild.getProjectDir().getName() + ".jar");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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.
@@ -45,8 +45,8 @@ public class RunningDocumentationTests {
@Test
public void applicationPluginMainClassName() throws IOException {
assertThat(this.gradleBuild
.script("src/main/gradle/running/application-plugin-main-class-name.gradle")
assertThat(this.gradleBuild.script(
"src/main/gradle/running/application-plugin-main-class-name.gradle")
.build("configuredMainClass").getOutput())
.contains("com.example.ExampleApplication");
}

View File

@@ -108,7 +108,7 @@ public class JarFile extends java.util.jar.JarFile {
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
RandomAccessData data, JarEntryFilter filter, JarFileType type)
throws IOException {
throws IOException {
super(rootFile.getFile());
this.rootFile = rootFile;
this.pathFromRoot = pathFromRoot;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 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.
@@ -125,11 +125,9 @@ public class JarFileArchiveTests {
File nested = new File(this.archive
.getNestedArchive(getEntriesMap(this.archive).get("nested.jar")).getUrl()
.toURI());
File anotherNested = new File(
this.archive
.getNestedArchive(
getEntriesMap(this.archive).get("another-nested.jar"))
.getUrl().toURI());
File anotherNested = new File(this.archive
.getNestedArchive(getEntriesMap(this.archive).get("another-nested.jar"))
.getUrl().toURI());
assertThat(nested.getParent()).isEqualTo(anotherNested.getParent());
}