remove exception when comparing terms from 2 different vocabularies
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 14 Sep 2022 11:13:22 +0000 (13:13 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 14 Sep 2022 11:13:22 +0000 (13:13 +0200)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/term/OrderedTermBase.java

index 9c96021927b41e267393ef53751d16acb7b762c4..372065ed3e567e3bb1afe4ef00bc623e7c3035ef 100644 (file)
@@ -134,9 +134,6 @@ public abstract class OrderedTermBase<T extends OrderedTermBase<T>>
             if (this.vocabulary == null || thatTermLocal.vocabulary == null){
                 throw new IllegalStateException("An ordered term (" + this.toString() + " or " + thatTermLocal.toString() + ") of class " + this.getClass() + " or " + thatTermLocal.getClass() + " does not belong to a vocabulary and therefore can not be compared");
             }
-            if (! this.getVocabulary().getUuid().equals(thatTermLocal.vocabulary.getUuid())){
-               throw new IllegalStateException("2 terms do not belong to the same vocabulary and therefore can not be compared: " + this.getTitleCache() + " and " + thatTermLocal.getTitleCache());
-            }
         }
 
        int vocCompare = compareVocabularies(thatTermLocal);