File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/domain/values Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 2222
2323import javax .annotation .Nullable ;
2424
25- import org .springframework .util .Assert ;
25+ import org .springframework .util .StringUtils ;
2626
2727@ lombok .Data
2828public final class BuildVersion implements Serializable , Comparable <BuildVersion > {
2929
30+ private static final String DEFAULT_VERSION = "UNKNOWN" ;
31+
3032 private final String value ;
3133
3234 private BuildVersion (String value ) {
33- Assert .hasText (value , "'value' must not be empty" );
34- this .value = value ;
35+ if (!StringUtils .hasText (value )) {
36+ this .value = DEFAULT_VERSION ;
37+ } else {
38+ this .value = value ;
39+ }
3540 }
3641
3742 public static BuildVersion valueOf (String s ) {
You can’t perform that action at this time.
0 commit comments