Project

General

Profile

Revision 244c62c6

ID244c62c6bee1863dfe79d71e0ecae7bdeb4d06b5
Parent 59b19202
Child e68bc8fa

Added by Andreas Müller 9 months ago

fix #8482 workaround fix for DescriptionType includes error

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/DescriptionType.java
148 148
     * @return
149 149
     */
150 150
    protected static boolean includesType(EnumSet<DescriptionType> set, DescriptionType state) {
151
        EnumSet<DescriptionType> all = EnumSet.copyOf(state.getGeneralizationOf(true));
151
        EnumSet<DescriptionType> all;
152
        if (state.getGeneralizationOf(true).isEmpty()){
153
            all = EnumSet.noneOf(DescriptionType.class);
154
        }else{
155
            all = EnumSet.copyOf(state.getGeneralizationOf(true));
156
        }
152 157
        all.add(state);
153 158
        for (DescriptionType st : all){
154 159
            if (set.contains(st)){
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/term/EnumeratedTermVoc.java
90 90

  
91 91
		@Override
92 92
		public Set<T> getGeneralizationOf(boolean recursive) {
93
			Set<T> result = new HashSet<T>();
93
			Set<T> result = new HashSet<>();
94 94
			result.addAll(this.children);
95 95
			if (recursive){
96 96
				for (T child : this.children){

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)