Upgrade to spring-javaformat 0.0.11

This commit is contained in:
Andy Wilkinson
2019-06-07 09:44:58 +01:00
parent d548c5ed31
commit 8f1be4cded
1940 changed files with 16814 additions and 28498 deletions

View File

@@ -49,8 +49,7 @@ public class SampleDataGemFireApplication {
private final SampleDataGemFireProperties properties;
public SampleDataGemFireApplication(
SampleDataGemFireProperties applicationProperties) {
public SampleDataGemFireApplication(SampleDataGemFireProperties applicationProperties) {
this.properties = applicationProperties;
}
@@ -64,8 +63,7 @@ public class SampleDataGemFireApplication {
private Properties getCacheProperties() {
Properties properties = new Properties();
properties.setProperty("name",
SampleDataGemFireApplication.class.getSimpleName());
properties.setProperty("name", SampleDataGemFireApplication.class.getSimpleName());
properties.setProperty("mcast-port", "0");
properties.setProperty("locators", "");
properties.setProperty("log-level", this.properties.getLogLevel());

View File

@@ -42,9 +42,8 @@ public class GemstoneServiceImpl implements GemstoneService {
protected static final List<String> APPROVED_GEMS;
static {
APPROVED_GEMS = Collections.unmodifiableList(
Arrays.asList(("ALEXANDRITE,AQUAMARINE,DIAMOND,OPAL,PEARL,"
+ "RUBY,SAPPHIRE,SPINEL,TOPAZ").split(",")));
APPROVED_GEMS = Collections.unmodifiableList(Arrays
.asList(("ALEXANDRITE,AQUAMARINE,DIAMOND,OPAL,PEARL," + "RUBY,SAPPHIRE,SPINEL,TOPAZ").split(",")));
}
private final GemstoneRepository repository;
@@ -120,8 +119,7 @@ public class GemstoneServiceImpl implements GemstoneService {
// in GemFire rather than before to demonstrate transactions in GemFire.
Gemstone savedGemstone = validate(this.repository.save(gemstone));
Assert.state(savedGemstone.equals(get(gemstone.getId())),
String.format("Failed to find Gemstone (%1$s) in "
+ "GemFire's Cache Region 'Gemstones'!", gemstone));
String.format("Failed to find Gemstone (%1$s) in " + "GemFire's Cache Region 'Gemstones'!", gemstone));
System.out.printf("Saved Gemstone [%1$s]%n", savedGemstone.getName());
return gemstone;
}
@@ -131,8 +129,7 @@ public class GemstoneServiceImpl implements GemstoneService {
// NOTE if the Gemstone is not valid, throw error...
// Should cause transaction to rollback in GemFire!
System.err.printf("Illegal Gemstone [%1$s]!%n", gemstone.getName());
throw new IllegalGemstoneException(
String.format("[%1$s] is not a valid Gemstone!", gemstone.getName()));
throw new IllegalGemstoneException(String.format("[%1$s] is not a valid Gemstone!", gemstone.getName()));
}
return gemstone;
}

View File

@@ -63,8 +63,7 @@ public class SampleDataGemFireApplicationTests {
this.service.save(createGemstone("Pearl"));
this.service.save(createGemstone("Sapphire"));
assertThat(this.service.count()).isEqualTo(4);
assertThat(this.service.list())
.contains(getGemstones("Diamond", "Ruby", "Pearl", "Sapphire"));
assertThat(this.service.list()).contains(getGemstones("Diamond", "Ruby", "Pearl", "Sapphire"));
try {
this.service.save(createGemstone("Quartz"));
}
@@ -72,8 +71,7 @@ public class SampleDataGemFireApplicationTests {
// expected
}
assertThat(this.service.count()).isEqualTo(4);
assertThat(this.service.list())
.contains(getGemstones("Diamond", "Ruby", "Pearl", "Sapphire"));
assertThat(this.service.list()).contains(getGemstones("Diamond", "Ruby", "Pearl", "Sapphire"));
assertThat(this.service.get("Diamond")).isEqualTo(createGemstone("Diamond"));
assertThat(this.service.get("Pearl")).isEqualTo(createGemstone("Pearl"));
}