fix NPE testing Ontoserver
This commit is contained in:
parent
0645c79eb6
commit
5956da771e
|
@ -195,7 +195,6 @@ public class TxTesterSorters {
|
|||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -220,8 +219,8 @@ public class TxTesterSorters {
|
|||
}
|
||||
}
|
||||
if (o1.getName().equals(o2.getName()) && o1.getName().equals("designation")) {
|
||||
String code1 = o1.getPart("language").hasValue() ? o1.getPart("language").getValue().primitiveValue().toLowerCase() : "";
|
||||
String code2 = o2.getPart("language").hasValue() ? o2.getPart("language").getValue().primitiveValue().toLowerCase() : "";
|
||||
String code1 = o1.hasPart("language") && o1.getPart("language").hasValue() && o1.getPart("language").getValue().primitiveValue() != null ? o1.getPart("language").getValue().primitiveValue().toLowerCase() : "";
|
||||
String code2 = o2.hasPart("language") && o2.getPart("language").hasValue() && o2.getPart("language").getValue().primitiveValue() != null ? o2.getPart("language").getValue().primitiveValue().toLowerCase() : "";
|
||||
if (code1 != null && code2 != null && !code1.equals(code2)) {
|
||||
return code1.compareTo(code2);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue