diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 7f1766dd1b68..df1bf12fd2db 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -2,6 +2,16 @@
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/README.adoc b/README.adoc
index 15a75140de89..9cbf0fb87275 100755
--- a/README.adoc
+++ b/README.adoc
@@ -1,4 +1,4 @@
-= Spring Boot image:https://ci.spring.io/api/v1/teams/spring-boot/pipelines/spring-boot-3.1.x/jobs/build/badge["Build Status", link="https://ci.spring.io/teams/spring-boot/pipelines/spring-boot-3.1.x?groups=Build"] image:https://badges.gitter.im/Join Chat.svg["Chat",link="https://gitter.im/spring-projects/spring-boot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"] image:https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Develocity", link="https://ge.spring.io/scans?&search.rootProjectNames=Spring%20Boot%20Build&search.rootProjectNames=spring-boot-build"]
+= Spring Boot image:https://ci.spring.io/api/v1/teams/spring-boot/pipelines/spring-boot-3.3.x/jobs/build/badge["Build Status", link="https://ci.spring.io/teams/spring-boot/pipelines/spring-boot-3.3.x?groups=Build"] image:https://badges.gitter.im/Join Chat.svg["Chat",link="https://gitter.im/spring-projects/spring-boot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"] image:https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle&labelColor=02303A["Revved up by Develocity", link="https://ge.spring.io/scans?&search.rootProjectNames=Spring%20Boot%20Build&search.rootProjectNames=spring-boot-build"]
:docs: https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference
:github: https://github.com/spring-projects/spring-boot
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index 5d9fe4c4b8cc..870f4a7355b8 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -17,11 +17,12 @@ def versions = [:]
new File(projectDir.parentFile, "gradle.properties").withInputStream {
def properties = new Properties()
properties.load(it)
- ["assertj", "commonsCodec", "hamcrest", "jackson", "junitJupiter",
- "kotlin", "maven", "springFramework"].each {
+ ["assertj", "commonsCodec", "hamcrest", "junitJupiter", "kotlin", "maven"].each {
versions[it] = properties[it + "Version"]
}
}
+versions["jackson"] = "2.15.3"
+versions["springFramework"] = "6.0.12"
ext.set("versions", versions)
if (versions.springFramework.contains("-")) {
repositories {
@@ -136,4 +137,3 @@ eclipse.classpath.file.whenMerged {
jreEntry.entryAttributes['module'] = 'true'
jreEntry.entryAttributes['limit-modules'] = 'java.base'
}
-
diff --git a/buildSrc/src/main/java/org/springframework/boot/build/AsciidoctorConventions.java b/buildSrc/src/main/java/org/springframework/boot/build/AsciidoctorConventions.java
index 537ff277f739..8fb4d4d9e4e1 100644
--- a/buildSrc/src/main/java/org/springframework/boot/build/AsciidoctorConventions.java
+++ b/buildSrc/src/main/java/org/springframework/boot/build/AsciidoctorConventions.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2023 the original author or authors.
+ * Copyright 2012-2024 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.
@@ -134,7 +134,7 @@ private void configureForkOptions(AbstractAsciidoctorTask asciidoctorTask) {
private String determineGitHubTag(Project project) {
String version = "v" + project.getVersion();
- return (version.endsWith("-SNAPSHOT")) ? "3.1.x" : version;
+ return (version.endsWith("-SNAPSHOT")) ? "main" : version;
}
private void configureOptions(AbstractAsciidoctorTask asciidoctorTask) {
diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/BomPlugin.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/BomPlugin.java
index 6cbd5ae787b5..0cc7b4189068 100644
--- a/buildSrc/src/main/java/org/springframework/boot/build/bom/BomPlugin.java
+++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/BomPlugin.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2023 the original author or authors.
+ * Copyright 2012-2024 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.
@@ -291,9 +291,7 @@ private boolean isNodeWithName(Object candidate, String name) {
if ((node.name() instanceof QName qname) && name.equals(qname.getLocalPart())) {
return true;
}
- if (name.equals(node.name())) {
- return true;
- }
+ return name.equals(node.name());
}
return false;
}
diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/StandardLibraryUpdateResolver.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/StandardLibraryUpdateResolver.java
index 517bf262a3a9..f5ffd02cac42 100644
--- a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/StandardLibraryUpdateResolver.java
+++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/StandardLibraryUpdateResolver.java
@@ -19,14 +19,12 @@
import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;
import java.util.function.BiPredicate;
-import java.util.stream.Collectors;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -113,19 +111,14 @@ private List determineResolvedVersionOptions(Library library) {
getLaterVersionsForModule(group.getId(), plugin, library));
}
}
- List allVersions = moduleVersions.values()
+ return moduleVersions.values()
.stream()
.flatMap(SortedSet::stream)
.distinct()
.filter((dependencyVersion) -> this.predicate.test(library, dependencyVersion))
- .toList();
- if (allVersions.isEmpty()) {
- return Collections.emptyList();
- }
- return allVersions.stream()
- .map((version) -> new VersionOption.ResolvedVersionOption(version,
+ .map((version) -> (VersionOption) new VersionOption.ResolvedVersionOption(version,
getMissingModules(moduleVersions, version)))
- .collect(Collectors.toList());
+ .toList();
}
private List getMissingModules(Map> moduleVersions,
diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeDependencies.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeDependencies.java
index 04934445cd87..19e897cb823d 100644
--- a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeDependencies.java
+++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeDependencies.java
@@ -169,8 +169,9 @@ private List verifyLabels(GitHubRepository repository) {
if (!availableLabels.containsAll(issueLabels)) {
List unknownLabels = new ArrayList<>(issueLabels);
unknownLabels.removeAll(availableLabels);
+ String suffix = (unknownLabels.size() == 1) ? "" : "s";
throw new InvalidUserDataException(
- "Unknown label(s): " + StringUtils.collectionToCommaDelimitedString(unknownLabels));
+ "Unknown label" + suffix + ": " + StringUtils.collectionToCommaDelimitedString(unknownLabels));
}
return issueLabels;
}
@@ -193,7 +194,7 @@ private Milestone determineMilestone(GitHubRepository repository) {
java.util.Optional matchingMilestone = milestones.stream()
.filter((milestone) -> milestone.getName().equals(getMilestone().get()))
.findFirst();
- if (!matchingMilestone.isPresent()) {
+ if (matchingMilestone.isEmpty()) {
throw new InvalidUserDataException("Unknown milestone: " + getMilestone().get());
}
return matchingMilestone.get();
@@ -241,9 +242,9 @@ private boolean isAnUpgrade(Library library, DependencyVersion candidate) {
}
private boolean isNotProhibited(Library library, DependencyVersion candidate) {
- return !library.getProhibitedVersions()
+ return library.getProhibitedVersions()
.stream()
- .anyMatch((prohibited) -> prohibited.isProhibited(candidate.toString()));
+ .noneMatch((prohibited) -> prohibited.isProhibited(candidate.toString()));
}
private List matchingLibraries() {
diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/AbstractDependencyVersion.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/AbstractDependencyVersion.java
index 4d17ceefc81f..d0c74aa2da4e 100644
--- a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/AbstractDependencyVersion.java
+++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/AbstractDependencyVersion.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2023 the original author or authors.
+ * Copyright 2012-2024 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.
@@ -58,10 +58,7 @@ public boolean equals(Object obj) {
return false;
}
AbstractDependencyVersion other = (AbstractDependencyVersion) obj;
- if (!this.comparableVersion.equals(other.comparableVersion)) {
- return false;
- }
- return true;
+ return this.comparableVersion.equals(other.comparableVersion);
}
@Override
diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/DependencyVersion.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/DependencyVersion.java
index f4b9b897a1ba..d82d5b8a50f5 100644
--- a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/DependencyVersion.java
+++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/DependencyVersion.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2023 the original author or authors.
+ * Copyright 2012-2024 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.
@@ -48,7 +48,7 @@ public interface DependencyVersion extends Comparable {
* Returns whether the given {@code candidate} is an upgrade of this version.
* @param candidate the version to consider
* @param movingToSnapshots whether the upgrade is to be considered as part of moving
- * to snaphots
+ * to snapshots
* @return {@code true} if the candidate is an upgrade, otherwise false
*/
boolean isUpgrade(DependencyVersion candidate, boolean movingToSnapshots);
diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/ReleaseTrainDependencyVersion.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/ReleaseTrainDependencyVersion.java
index c9c79bcdc69b..e43c1b05d9de 100644
--- a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/ReleaseTrainDependencyVersion.java
+++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/version/ReleaseTrainDependencyVersion.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2023 the original author or authors.
+ * Copyright 2012-2024 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.
@@ -64,22 +64,25 @@ public int compareTo(DependencyVersion other) {
@Override
public boolean isUpgrade(DependencyVersion candidate, boolean movingToSnapshots) {
- if (!(candidate instanceof ReleaseTrainDependencyVersion)) {
- return true;
+ if (candidate instanceof ReleaseTrainDependencyVersion candidateReleaseTrain) {
+ return isUpgrade(candidateReleaseTrain, movingToSnapshots);
}
- ReleaseTrainDependencyVersion candidateReleaseTrain = (ReleaseTrainDependencyVersion) candidate;
- int comparison = this.releaseTrain.compareTo(candidateReleaseTrain.releaseTrain);
+ return true;
+ }
+
+ private boolean isUpgrade(ReleaseTrainDependencyVersion candidate, boolean movingToSnapshots) {
+ int comparison = this.releaseTrain.compareTo(candidate.releaseTrain);
if (comparison != 0) {
return comparison < 0;
}
- if (movingToSnapshots && !isSnapshot() && candidateReleaseTrain.isSnapshot()) {
+ if (movingToSnapshots && !isSnapshot() && candidate.isSnapshot()) {
return true;
}
- comparison = this.type.compareTo(candidateReleaseTrain.type);
+ comparison = this.type.compareTo(candidate.type);
if (comparison != 0) {
return comparison < 0;
}
- return Integer.compare(this.version, candidateReleaseTrain.version) < 0;
+ return Integer.compare(this.version, candidate.version) < 0;
}
private boolean isSnapshot() {
@@ -88,10 +91,9 @@ private boolean isSnapshot() {
@Override
public boolean isSnapshotFor(DependencyVersion candidate) {
- if (!isSnapshot() || !(candidate instanceof ReleaseTrainDependencyVersion)) {
+ if (!isSnapshot() || !(candidate instanceof ReleaseTrainDependencyVersion candidateReleaseTrain)) {
return false;
}
- ReleaseTrainDependencyVersion candidateReleaseTrain = (ReleaseTrainDependencyVersion) candidate;
return this.releaseTrain.equals(candidateReleaseTrain.releaseTrain);
}
@@ -127,10 +129,7 @@ public boolean equals(Object obj) {
return false;
}
ReleaseTrainDependencyVersion other = (ReleaseTrainDependencyVersion) obj;
- if (!this.original.equals(other.original)) {
- return false;
- }
- return true;
+ return this.original.equals(other.original);
}
@Override
diff --git a/buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java b/buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java
index 548344b731fd..abc1098e8d37 100644
--- a/buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java
+++ b/buildSrc/src/main/java/org/springframework/boot/build/classpath/CheckClasspathForProhibitedDependencies.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2023 the original author or authors.
+ * Copyright 2012-2024 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.
@@ -100,10 +100,7 @@ private boolean prohibited(ModuleVersionIdentifier id) {
if (group.equals("org.apache.geronimo.specs")) {
return true;
}
- if (group.equals("com.sun.activation")) {
- return true;
- }
- return false;
+ return group.equals("com.sun.activation");
}
}
diff --git a/buildSrc/src/main/java/org/springframework/boot/build/context/properties/CheckAdditionalSpringConfigurationMetadata.java b/buildSrc/src/main/java/org/springframework/boot/build/context/properties/CheckAdditionalSpringConfigurationMetadata.java
index d45b1d4e9299..cc7bdfd87b20 100644
--- a/buildSrc/src/main/java/org/springframework/boot/build/context/properties/CheckAdditionalSpringConfigurationMetadata.java
+++ b/buildSrc/src/main/java/org/springframework/boot/build/context/properties/CheckAdditionalSpringConfigurationMetadata.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2022 the original author or authors.
+ * Copyright 2012-2023 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.
@@ -93,7 +93,7 @@ private Report createReport() throws IOException, JsonParseException, JsonMappin
@SuppressWarnings("unchecked")
private void check(String key, Map json, Analysis analysis) {
- List