Skip to content

Commit b2f5ccc

Browse files
author
Vincent Potucek
committed
1 parent 359ebb7 commit b2f5ccc

File tree

14 files changed

+39
-41
lines changed

14 files changed

+39
-41
lines changed

buildSrc/src/main/java/org/springframework/boot/build/DeployedPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ public void apply(Project project) {
4747
project.afterEvaluate((evaluated) -> project.getPlugins().withType(JavaPlugin.class).all((javaPlugin) -> {
4848
if (((Jar) project.getTasks().getByName(JavaPlugin.JAR_TASK_NAME)).isEnabled()) {
4949
project.getComponents()
50-
.matching((component) -> component.getName().equals("java"))
50+
.matching((component) -> "java".equals(component.getName()))
5151
.all(mavenPublication::from);
5252
}
5353
}));
5454
project.getPlugins()
5555
.withType(JavaPlatformPlugin.class)
5656
.all((javaPlugin) -> project.getComponents()
57-
.matching((component) -> component.getName().equals("javaPlatform"))
57+
.matching((component) -> "javaPlatform".equals(component.getName()))
5858
.all(mavenPublication::from));
5959
}
6060

buildSrc/src/main/java/org/springframework/boot/build/MavenRepositoryPlugin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ public void apply(Project project) {
6262
mavenRepository.setUrl(repositoryLocation.toURI());
6363
});
6464
project.getTasks()
65-
.matching((task) -> task.getName().equals(PUBLISH_TO_PROJECT_REPOSITORY_TASK_NAME))
65+
.matching((task) -> PUBLISH_TO_PROJECT_REPOSITORY_TASK_NAME.equals(task.getName()))
6666
.all((task) -> setUpProjectRepository(project, task, repositoryLocation));
6767
project.getTasks()
68-
.matching((task) -> task.getName().equals("publishPluginMavenPublicationToProjectRepository"))
68+
.matching((task) -> "publishPluginMavenPublicationToProjectRepository".equals(task.getName()))
6969
.all((task) -> setUpProjectRepository(project, task, repositoryLocation));
7070
}
7171

buildSrc/src/main/java/org/springframework/boot/build/antora/CheckJavadocMacros.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ private WellKnownAnchor(Origin origin) {
336336
}
337337

338338
private static WellKnownAnchor of(String anchor, Origin origin) {
339-
if (anchor.equals("enum-constant-summary")) {
339+
if ("enum-constant-summary".equals(anchor)) {
340340
return new WellKnownAnchor(origin);
341341
}
342342
return null;

buildSrc/src/main/java/org/springframework/boot/build/architecture/AutoConfigurationChecker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private JavaClass[] getImportedClasses(JavaClass javaClass) {
117117

118118
private boolean isBootClass(JavaClass javaClass) {
119119
String pkg = javaClass.getPackage().getName();
120-
return pkg.equals(SPRING_BOOT_ROOT_PACKAGE) || pkg.startsWith(SPRING_BOOT_ROOT_PACKAGE + ".");
120+
return SPRING_BOOT_ROOT_PACKAGE.equals(pkg) || pkg.startsWith(SPRING_BOOT_ROOT_PACKAGE + ".");
121121
}
122122

123123
}

buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/StandardLibraryUpdateResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public List<LibraryWithVersionOptions> findLibraryUpdates(Collection<Library> li
7474
}
7575

7676
protected boolean isLibraryExcluded(Library library) {
77-
return library.getName().equals("Spring Boot");
77+
return "Spring Boot".equals(library.getName());
7878
}
7979

8080
protected List<VersionOption> getVersionOptions(Library library) {

buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private boolean prohibited(ModuleVersionIdentifier id) {
8585
}
8686

8787
private boolean prohibitedSlf4j(ModuleVersionIdentifier id) {
88-
return id.getGroup().equals("org.slf4j") && id.getName().equals("jcl-over-slf4j");
88+
return "org.slf4j".equals(id.getGroup()) && "jcl-over-slf4j".equals(id.getName());
8989
}
9090

9191
private boolean prohibitedJbossSpec(ModuleVersionIdentifier id) {

buildSrc/src/main/java/org/springframework/boot/build/starters/DocumentStarters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ private Starter(String name, String description, Set<String> dependencies) {
139139
}
140140

141141
private boolean isProduction() {
142-
return this.name.equals("spring-boot-starter-actuator");
142+
return "spring-boot-starter-actuator".equals(this.name);
143143
}
144144

145145
private boolean isTechnical() {

buildSrc/src/test/java/org/springframework/boot/build/ConventionsPluginTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void setup(@TempDir File projectDir) throws IOException {
7070
}
7171

7272
@Test
73-
void jarIncludesLegalFiles() throws IOException {
73+
void jarIncludesLegalFiles() throws Exception {
7474
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
7575
out.println("plugins {");
7676
out.println(" id 'java'");
@@ -101,7 +101,7 @@ void jarIncludesLegalFiles() throws IOException {
101101
}
102102

103103
@Test
104-
void sourceJarIsBuilt() throws IOException {
104+
void sourceJarIsBuilt() throws Exception {
105105
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
106106
out.println("plugins {");
107107
out.println(" id 'java'");
@@ -132,7 +132,7 @@ void sourceJarIsBuilt() throws IOException {
132132
}
133133

134134
@Test
135-
void javadocJarIsBuilt() throws IOException {
135+
void javadocJarIsBuilt() throws Exception {
136136
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
137137
out.println("plugins {");
138138
out.println(" id 'java'");
@@ -176,7 +176,7 @@ private void assertThatNoticeIsPresent(JarFile jar) throws IOException {
176176
}
177177

178178
@Test
179-
void testRetryIsConfiguredWithThreeRetriesOnCI() throws IOException {
179+
void retryIsConfiguredWithThreeRetriesOnCI() throws Exception {
180180
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
181181
out.println("plugins {");
182182
out.println(" id 'java'");
@@ -198,7 +198,7 @@ void testRetryIsConfiguredWithThreeRetriesOnCI() throws IOException {
198198
}
199199

200200
@Test
201-
void testRetryIsConfiguredWithZeroRetriesLocally() throws IOException {
201+
void retryIsConfiguredWithZeroRetriesLocally() throws Exception {
202202
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
203203
out.println("plugins {");
204204
out.println(" id 'java'");

buildSrc/src/test/java/org/springframework/boot/build/autoconfigure/DocumentAutoConfigurationClassesTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class DocumentAutoConfigurationClassesTests {
4343
private File temp;
4444

4545
@Test
46-
void classesAreDocumented() throws IOException {
46+
void classesAreDocumented() throws Exception {
4747
File output = documentAutoConfigurationClasses((metadataDir) -> {
4848
writeAutoConfigurationMetadata("spring-boot-one", List.of("org.springframework.boot.one.AAutoConfiguration",
4949
"org.springframework.boot.one.BAutoConfiguration"), metadataDir);
@@ -56,7 +56,7 @@ void classesAreDocumented() throws IOException {
5656
}
5757

5858
@Test
59-
void whenMetadataIsRemovedThenOutputForThatMetadataIsNoLongerPresent() throws IOException {
59+
void whenMetadataIsRemovedThenOutputForThatMetadataIsNoLongerPresent() throws Exception {
6060
documentAutoConfigurationClasses((metadataDir) -> {
6161
writeAutoConfigurationMetadata("spring-boot-one", List.of("org.springframework.boot.one.AAutoConfiguration",
6262
"org.springframework.boot.one.BAutoConfiguration"), metadataDir);

buildSrc/src/test/java/org/springframework/boot/build/bom/BomPluginIntegrationTests.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import java.io.File;
2020
import java.io.FileWriter;
21-
import java.io.IOException;
2221
import java.io.PrintWriter;
2322
import java.util.function.Consumer;
2423

@@ -51,7 +50,7 @@ void setup(@TempDir File projectDir) {
5150
}
5251

5352
@Test
54-
void libraryModulesAreIncludedInDependencyManagementOfGeneratedPom() throws IOException {
53+
void libraryModulesAreIncludedInDependencyManagementOfGeneratedPom() throws Exception {
5554
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
5655
out.println("plugins {");
5756
out.println(" id 'org.springframework.boot.bom'");
@@ -88,7 +87,7 @@ void libraryModulesAreIncludedInDependencyManagementOfGeneratedPom() throws IOEx
8887
}
8988

9089
@Test
91-
void libraryPluginsAreIncludedInPluginManagementOfGeneratedPom() throws IOException {
90+
void libraryPluginsAreIncludedInPluginManagementOfGeneratedPom() throws Exception {
9291
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
9392
out.println("plugins {");
9493
out.println(" id 'org.springframework.boot.bom'");
@@ -143,7 +142,7 @@ void libraryImportsAreIncludedInDependencyManagementOfGeneratedPom() throws Exce
143142
}
144143

145144
@Test
146-
void moduleExclusionsAreIncludedInDependencyManagementOfGeneratedPom() throws IOException {
145+
void moduleExclusionsAreIncludedInDependencyManagementOfGeneratedPom() throws Exception {
147146
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
148147
out.println("plugins {");
149148
out.println(" id 'org.springframework.boot.bom'");
@@ -177,7 +176,7 @@ void moduleExclusionsAreIncludedInDependencyManagementOfGeneratedPom() throws IO
177176
}
178177

179178
@Test
180-
void moduleTypesAreIncludedInDependencyManagementOfGeneratedPom() throws IOException {
179+
void moduleTypesAreIncludedInDependencyManagementOfGeneratedPom() throws Exception {
181180
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
182181
out.println("plugins {");
183182
out.println(" id 'org.springframework.boot.bom'");
@@ -209,7 +208,7 @@ void moduleTypesAreIncludedInDependencyManagementOfGeneratedPom() throws IOExcep
209208
}
210209

211210
@Test
212-
void moduleClassifiersAreIncludedInDependencyManagementOfGeneratedPom() throws IOException {
211+
void moduleClassifiersAreIncludedInDependencyManagementOfGeneratedPom() throws Exception {
213212
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
214213
out.println("plugins {");
215214
out.println(" id 'org.springframework.boot.bom'");
@@ -268,7 +267,7 @@ void moduleClassifiersAreIncludedInDependencyManagementOfGeneratedPom() throws I
268267
}
269268

270269
@Test
271-
void libraryNamedSpringBootHasNoVersionProperty() throws IOException {
270+
void libraryNamedSpringBootHasNoVersionProperty() throws Exception {
272271
try (PrintWriter out = new PrintWriter(new FileWriter(this.buildFile))) {
273272
out.println("plugins {");
274273
out.println(" id 'org.springframework.boot.bom'");

0 commit comments

Comments
 (0)