Skip to content

Commit e741790

Browse files
committed
Upgrade to Spring Java Format 0.0.38
Closes gh-890
1 parent 24ad0a8 commit e741790

File tree

142 files changed

+2994
-2090
lines changed

Some content is hidden

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

142 files changed

+2994
-2090
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ subprojects { subproject ->
8080
checkstyle {
8181
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
8282
configProperties = [ "checkstyle.config.dir" : rootProject.file("config/checkstyle") ]
83-
toolVersion = "8.22"
83+
toolVersion = "10.11.0"
8484
}
8585

8686
dependencies {

docs/src/test/java/com/example/Hypermedia.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ private Hypermedia() {
3131
// tag::ignore-links[]
3232
public static LinksSnippet links(LinkDescriptor... descriptors) {
3333
return HypermediaDocumentation.links(linkWithRel("self").ignored().optional(), linkWithRel("curies").ignored())
34-
.and(descriptors);
34+
.and(descriptors);
3535
}
3636
// end::ignore-links[]
3737

docs/src/test/java/com/example/mockmvc/CustomDefaultOperationPreprocessors.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,10 +42,10 @@ public class CustomDefaultOperationPreprocessors {
4242
public void setup() {
4343
// tag::custom-default-operation-preprocessors[]
4444
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
45-
.apply(documentationConfiguration(this.restDocumentation).operationPreprocessors()
46-
.withRequestDefaults(removeHeaders("Foo")) // <1>
47-
.withResponseDefaults(prettyPrint())) // <2>
48-
.build();
45+
.apply(documentationConfiguration(this.restDocumentation).operationPreprocessors()
46+
.withRequestDefaults(removeHeaders("Foo")) // <1>
47+
.withResponseDefaults(prettyPrint())) // <2>
48+
.build();
4949
// end::custom-default-operation-preprocessors[]
5050
}
5151

docs/src/test/java/com/example/mockmvc/CustomDefaultSnippets.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,8 +43,8 @@ public class CustomDefaultSnippets {
4343
public void setUp() {
4444
// tag::custom-default-snippets[]
4545
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
46-
.apply(documentationConfiguration(this.restDocumentation).snippets().withDefaults(curlRequest()))
47-
.build();
46+
.apply(documentationConfiguration(this.restDocumentation).snippets().withDefaults(curlRequest()))
47+
.build();
4848
// end::custom-default-snippets[]
4949
}
5050

docs/src/test/java/com/example/mockmvc/CustomEncoding.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,8 +42,8 @@ public class CustomEncoding {
4242
public void setUp() {
4343
// tag::custom-encoding[]
4444
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
45-
.apply(documentationConfiguration(this.restDocumentation).snippets().withEncoding("ISO-8859-1"))
46-
.build();
45+
.apply(documentationConfiguration(this.restDocumentation).snippets().withEncoding("ISO-8859-1"))
46+
.build();
4747
// end::custom-encoding[]
4848
}
4949

docs/src/test/java/com/example/mockmvc/CustomFormat.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,9 +43,9 @@ public class CustomFormat {
4343
public void setUp() {
4444
// tag::custom-format[]
4545
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
46-
.apply(documentationConfiguration(this.restDocumentation).snippets()
47-
.withTemplateFormat(TemplateFormats.markdown()))
48-
.build();
46+
.apply(documentationConfiguration(this.restDocumentation).snippets()
47+
.withTemplateFormat(TemplateFormats.markdown()))
48+
.build();
4949
// end::custom-format[]
5050
}
5151

docs/src/test/java/com/example/mockmvc/CustomUriConfiguration.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,9 +42,11 @@ public class CustomUriConfiguration {
4242
public void setUp() {
4343
// tag::custom-uri-configuration[]
4444
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
45-
.apply(documentationConfiguration(this.restDocumentation).uris().withScheme("https")
46-
.withHost("example.com").withPort(443))
47-
.build();
45+
.apply(documentationConfiguration(this.restDocumentation).uris()
46+
.withScheme("https")
47+
.withHost("example.com")
48+
.withPort(443))
49+
.build();
4850
// end::custom-uri-configuration[]
4951
}
5052

docs/src/test/java/com/example/mockmvc/EveryTestPreprocessing.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -46,17 +46,18 @@ public class EveryTestPreprocessing {
4646
@Before
4747
public void setup() {
4848
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
49-
.apply(documentationConfiguration(this.restDocumentation).operationPreprocessors()
50-
.withRequestDefaults(removeHeaders("Foo")) // <1>
51-
.withResponseDefaults(prettyPrint())) // <2>
52-
.build();
49+
.apply(documentationConfiguration(this.restDocumentation).operationPreprocessors()
50+
.withRequestDefaults(removeHeaders("Foo")) // <1>
51+
.withResponseDefaults(prettyPrint())) // <2>
52+
.build();
5353
}
5454
// end::setup[]
5555

5656
public void use() throws Exception {
5757
// tag::use[]
58-
this.mockMvc.perform(get("/")).andExpect(status().isOk())
59-
.andDo(document("index", links(linkWithRel("self").description("Canonical self link"))));
58+
this.mockMvc.perform(get("/"))
59+
.andExpect(status().isOk())
60+
.andDo(document("index", links(linkWithRel("self").description("Canonical self link"))));
6061
// end::use[]
6162
}
6263

docs/src/test/java/com/example/mockmvc/ExampleApplicationJUnit5Tests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2022 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,8 +37,8 @@ class ExampleApplicationJUnit5Tests {
3737
@BeforeEach
3838
void setUp(WebApplicationContext webApplicationContext, RestDocumentationContextProvider restDocumentation) {
3939
this.mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext)
40-
.apply(documentationConfiguration(restDocumentation)) // <1>
41-
.build();
40+
.apply(documentationConfiguration(restDocumentation)) // <1>
41+
.build();
4242
}
4343
// end::setup[]
4444

docs/src/test/java/com/example/mockmvc/ExampleApplicationTestNgTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2021 the original author or authors.
2+
* Copyright 2014-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,7 +43,8 @@ public class ExampleApplicationTestNgTests {
4343
@BeforeMethod
4444
public void setUp(Method method) {
4545
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
46-
.apply(documentationConfiguration(this.restDocumentation)).build();
46+
.apply(documentationConfiguration(this.restDocumentation))
47+
.build();
4748
this.restDocumentation.beforeTest(getClass(), method.getName());
4849
}
4950

0 commit comments

Comments
 (0)