Skip to content

Commit

Permalink
Fix for NaN and Infinity values
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Andreev authored and Dmitry Andreev committed Apr 14, 2016
1 parent 333eefd commit 77a1925
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/java/ru/yandex/market/graphouse/server/MetricFactory.java
Expand Up @@ -44,6 +44,9 @@ public Metric createMetric(String line, int updated) {
}
try {
double value = Double.parseDouble(splits[1]);
if (!Double.isFinite(value)) {
return null;
}
int timeSeconds = Integer.valueOf(splits[2]);
if (timeSeconds <= 0) {
return null;
Expand Down

0 comments on commit 77a1925

Please sign in to comment.