Skip to content

Commit

Permalink
LiteralDeviationProcessor: support numerical value Infinite
Browse files Browse the repository at this point in the history
  • Loading branch information
jmkeil committed May 27, 2020
1 parent 08cdae7 commit c851f49
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,14 @@ public Collection<Deviation> computeDeviations(Model model1, Model model2, UUID
|| type2 instanceof XSDFloat)) {
// compare as BigDecimal (comparing Floats as Double results in precision
// problems for e.g. 0.001)
BigDecimal bigDecimalValue1 = new BigDecimal(value1.getLexicalForm());
BigDecimal bigDecimalValue2 = new BigDecimal(value2.getLexicalForm());
if (bigDecimalValue1.compareTo(bigDecimalValue2) == 0) {
continue;
try {
BigDecimal bigDecimalValue1 = new BigDecimal(value1.getLexicalForm());
BigDecimal bigDecimalValue2 = new BigDecimal(value2.getLexicalForm());
if (bigDecimalValue1.compareTo(bigDecimalValue2) == 0) {
continue;
}
} catch (NumberFormatException e) {
// do not avoid deviation registration
}
}
}
Expand Down

0 comments on commit c851f49

Please sign in to comment.