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

@@ -41,8 +41,7 @@ public class SampleController {
@Override
public String call() throws Exception {
return "async: "
+ SampleController.this.helloWorldService.getHelloMessage();
return "async: " + SampleController.this.helloWorldService.getHelloMessage();
}
};

View File

@@ -67,14 +67,11 @@ public class SampleUndertowApplicationTests {
HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.set("Accept-Encoding", "gzip");
HttpEntity<?> requestEntity = new HttpEntity<Object>(requestHeaders);
ResponseEntity<byte[]> entity = this.restTemplate.exchange("/", HttpMethod.GET,
requestEntity, byte[].class);
ResponseEntity<byte[]> entity = this.restTemplate.exchange("/", HttpMethod.GET, requestEntity, byte[].class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
GZIPInputStream inflater = new GZIPInputStream(
new ByteArrayInputStream(entity.getBody()));
GZIPInputStream inflater = new GZIPInputStream(new ByteArrayInputStream(entity.getBody()));
try {
assertThat(StreamUtils.copyToString(inflater, Charset.forName("UTF-8")))
.isEqualTo("Hello World");
assertThat(StreamUtils.copyToString(inflater, Charset.forName("UTF-8"))).isEqualTo("Hello World");
}
finally {
inflater.close();
@@ -82,8 +79,7 @@ public class SampleUndertowApplicationTests {
}
private void assertOkResponse(String path, String body) {
ResponseEntity<String> entity = this.restTemplate.getForEntity(path,
String.class);
ResponseEntity<String> entity = this.restTemplate.getForEntity(path, String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(entity.getBody()).isEqualTo(body);
}