Polish ternary operator

See gh-45156

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
Yanming Zhou
2025-04-11 10:12:13 +08:00
committed by Phillip Webb
parent b40fb62b4d
commit 0a1c9060c5

View File

@@ -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";
}
/**