Project

General

Profile

« Previous | Next » 

Revision 00e4c79f

Added by Andreas Kohlbecker 5 months ago

fix #9904 avoiding null value for RegistrationDT0.summaryTaggedText

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/RegistrationDTO.java
68 68

  
69 69
    private Set<TypedEntityReference<Registration>> blockedBy;
70 70

  
71
    private List<TaggedText> summaryTaggedText;
71
    private List<TaggedText> summaryTaggedText = new ArrayList<>();
72 72

  
73 73
    private String nomenclaturalCitationString;
74 74

  
......
100 100
            citationDetail = publishedUnit.getCitationMicroReference();
101 101
        }
102 102

  
103
        switch(registrationType) {
103
        switch (registrationType) {
104 104
        case EMPTY:
105 105
            summary = "BLANK REGISTRATION";
106
            summaryTaggedText = Arrays.asList(new TaggedText(TagEnum.label, summary));
106
            summaryTaggedText.addAll(Arrays.asList(new TaggedText(TagEnum.label, summary)));
107 107
            break;
108 108
        case NAME:
109 109
            summary = reg.getName().getTitleCache();
110
            summaryTaggedText = reg.getName().getTaggedName();
110
            summaryTaggedText.addAll(reg.getName().getTaggedName());
111 111
            break;
112 112
        case NAME_AND_TYPIFICATION:
113 113
        case TYPIFICATION:
114 114
        default:
115 115
            try {
116 116
                typeDesignationManager = new TypeDesignationSetManager(reg.getTypeDesignations());
117
                summaryTaggedText = new TypeDesignationSetFormatter(false, true, true).toTaggedText(typeDesignationManager);
117
                summaryTaggedText.addAll(new TypeDesignationSetFormatter(false, true, true)
118
                        .toTaggedText(typeDesignationManager));
118 119
                summary = TaggedCacheHelper.createString(summaryTaggedText);
119 120
            } catch (RegistrationValidationException e) {
120 121
                validationProblems.add("Validation errors: " + e.getMessage());

Also available in: Unified diff