Skip to content

Commit fe1f9b3

Browse files
vonZeppelinmhalbritter
authored andcommitted
Only set imagePlatform if it has text
See gh-43424
1 parent 48bc3b6 commit fe1f9b3

File tree

1 file changed

+3
-3
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven

1 file changed

+3
-3
lines changed

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/Image.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ private BuildRequest customize(BuildRequest request) {
257257
if (StringUtils.hasText(this.runImage)) {
258258
request = request.withRunImage(ImageReference.of(this.runImage));
259259
}
260-
if (this.env != null && !this.env.isEmpty()) {
260+
if (!CollectionUtils.isEmpty(this.env)) {
261261
request = request.withEnv(this.env);
262262
}
263263
if (this.cleanCache != null) {
@@ -295,10 +295,10 @@ private BuildRequest customize(BuildRequest request) {
295295
if (StringUtils.hasText(this.applicationDirectory)) {
296296
request = request.withApplicationDirectory(this.applicationDirectory);
297297
}
298-
if (this.securityOptions != null) {
298+
if (!CollectionUtils.isEmpty(this.securityOptions)) {
299299
request = request.withSecurityOptions(this.securityOptions);
300300
}
301-
if (this.imagePlatform != null) {
301+
if (StringUtils.hasText(this.imagePlatform)) {
302302
request = request.withImagePlatform(this.imagePlatform);
303303
}
304304
return request;

0 commit comments

Comments
 (0)