Project

General

Profile

« Previous | Next » 

Revision b32928ec

Added by Andreas Kohlbecker almost 6 years ago

avoiding null captions

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/util/TeamOrPersonBaseCaptionGenerator.java
35 35

  
36 36
    @Override
37 37
    public String getCaption(T option) {
38
        String caption = chooseTitle(option);
39
        if(caption == null){
40
            caption = option.getTitleCache();
41
        }
42
        return caption;
43
    }
44

  
45
    /**
46
     * @param option
47
     * @return
48
     */
49
    protected String chooseTitle(T option) {
38 50
        switch(cacheType){
39 51
        case NOMENCLATURAL_TITLE:
40 52
            return option.getNomenclaturalTitle();
......
42 54
            // return option.getCollectorTitle(); // enable once #4311 is solved
43 55
        case BIBLIOGRAPHIC_TITLE:
44 56
        default:
45
            return option.getTitleCache();
57
            return null;
46 58
        }
47 59
    }
48 60
}

Also available in: Unified diff