Skip to content

Commit a2c67cd

Browse files
committed
Merge pull request #20847 from dreis2211
* pr/20847: Polish ConditionMessage#because() Closes gh-20847
2 parents 520b8c8 + 2f93196 commit a2c67cd

File tree

1 file changed

+2
-2
lines changed
  • spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2019 the original author or authors.
2+
* Copyright 2012-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -300,7 +300,7 @@ public ConditionMessage because(String reason) {
300300
return new ConditionMessage(ConditionMessage.this, this.condition);
301301
}
302302
return new ConditionMessage(ConditionMessage.this,
303-
this.condition + (StringUtils.isEmpty(this.condition) ? "" : " ") + reason);
303+
StringUtils.isEmpty(this.condition) ? reason : this.condition + " " + reason);
304304
}
305305

306306
}

0 commit comments

Comments
 (0)