From 2f93196fbb2e9a7797c0d9544535315635085e44 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Sun, 5 Apr 2020 16:05:48 +0200 Subject: [PATCH] Polish ConditionMessage#because() See gh-20847 --- .../boot/autoconfigure/condition/ConditionMessage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java index c53e997d00a..18f2e074160 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 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. @@ -300,7 +300,7 @@ public final class ConditionMessage { return new ConditionMessage(ConditionMessage.this, this.condition); } return new ConditionMessage(ConditionMessage.this, - this.condition + (StringUtils.isEmpty(this.condition) ? "" : " ") + reason); + StringUtils.isEmpty(this.condition) ? reason : this.condition + " " + reason); } }