# HG changeset patch # User Robert Casties # Date 1532694226 -7200 # Node ID 135b29621a324b2a27abb112b588ee1f4086b68b # Parent ee8a923319ec62ad6b4aebe4616b7331dd1114d4 Fix bug with digitalizations having no own value. diff -r ee8a923319ec -r 135b29621a32 src/main/java/de/mpiwg/itgroup/ismi/utils/templates/DigitalizationTemplate.java --- a/src/main/java/de/mpiwg/itgroup/ismi/utils/templates/DigitalizationTemplate.java Tue Jul 03 16:47:16 2018 +0200 +++ b/src/main/java/de/mpiwg/itgroup/ismi/utils/templates/DigitalizationTemplate.java Fri Jul 27 14:23:46 2018 +0200 @@ -67,7 +67,18 @@ return titlesInCodex; } - public int compareTo(DigitalizationTemplate o) { + public int compareTo(DigitalizationTemplate o) { + boolean thisnull = (this.entity == null || this.entity.getOwnValue() == null); + boolean thatnull = (o.entity == null || o.entity.getOwnValue() == null); + if (thisnull && thatnull) { + return 0; + } + if (thisnull) { + return -1; + } + if (thatnull) { + return 1; + } return this.entity.getOwnValue().compareTo(o.getEntity().getOwnValue()); } } diff -r ee8a923319ec -r 135b29621a32 src/main/resources/own-value.cfg.xml --- a/src/main/resources/own-value.cfg.xml Tue Jul 03 16:47:16 2018 +0200 +++ b/src/main/resources/own-value.cfg.xml Fri Jul 27 14:23:46 2018 +0200 @@ -26,6 +26,10 @@ + + + + @@ -353,10 +357,15 @@ - + + + + + +