From 0a1c9060c5753c1df7c510d0263ef6979c4a6585 Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Fri, 11 Apr 2025 10:12:13 +0800 Subject: [PATCH] Polish ternary operator See gh-45156 Signed-off-by: Yanming Zhou --- .../boot/buildpack/platform/docker/type/Image.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/type/Image.java b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/type/Image.java index 4002374d0d3..5ff48432ea3 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/type/Image.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/type/Image.java @@ -91,7 +91,7 @@ public class Image extends MappedObject { * @return the image OS */ public String getOs() { - return (!StringUtils.hasText(this.os)) ? "linux" : this.os; + return (StringUtils.hasText(this.os)) ? this.os : "linux"; } /**