Project

General

Profile

« Previous | Next » 

Revision 3dde2518

Added by Andreas Kohlbecker about 6 years ago

#6169 fixing bug in TimePeriodFormatter

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/util/formatter/TimePeriodFormatter.java
34 34
           return timePeriod.getFreeText();
35 35
        }else{
36 36
            StringBuffer sb = new StringBuffer();
37
            if (timePeriod.getStart() != null) {
37
            if (timePeriod.getStart() != null && timePeriod.getStart().getFields().length > 0) {
38 38
                sb.append(partialFormatter.print(timePeriod.getStart()));
39 39
            }
40
            if (timePeriod.getEnd() != null) {
40
            if (timePeriod.getEnd() != null && timePeriod.getEnd().getFields().length > 0) {
41 41
                if (sb.length() > 0) {
42 42
                    sb.append(" - ");
43 43
                }

Also available in: Unified diff