Skip to content

Commit 1962ead

Browse files
committed
Improve code quality
1 parent 9b85c73 commit 1962ead

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private void addAntoraContentStartPaths(Set<String> startPaths) {
175175
private void addDir(Map<String, Object> data) {
176176
Path playbookDir = toRealPath(getOutputFile().get().getAsFile().toPath()).getParent();
177177
Path outputDir = toRealPath(getProject().getBuildDir().toPath().resolve("site"));
178-
data.put("output", Map.of("dir", "." + File.separator + playbookDir.relativize(outputDir).toString()));
178+
data.put("output", Map.of("dir", "." + File.separator + playbookDir.relativize(outputDir)));
179179
}
180180

181181
@SuppressWarnings("unchecked")

buildSrc/src/main/java/org/springframework/boot/build/bom/ManagedDependencies.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static ManagedDependencies ofBom(File bom) {
9999

100100
static String asId(String groupId, String artifactId, String version, String classifier) {
101101
String id = groupId + ":" + artifactId + ":" + version;
102-
if (classifier != null && classifier.length() > 0) {
102+
if (classifier != null && !classifier.isEmpty()) {
103103
id = id + ":" + classifier;
104104
}
105105
return id;

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private ConfigurationPropertiesBeanDescriptor describeBean(ObjectMapper mapper,
235235
@SuppressWarnings({ "unchecked" })
236236
private Map<String, Object> safeSerialize(ObjectMapper mapper, Object bean, String prefix) {
237237
try {
238-
return new HashMap<>(mapper.convertValue(bean, Map.class));
238+
return new HashMap<String, Object>(mapper.convertValue(bean, Map.class));
239239
}
240240
catch (Exception ex) {
241241
return new HashMap<>(Collections.singletonMap("error", "Cannot serialize '" + prefix + "'"));

0 commit comments

Comments
 (0)