Commit 415f0728 authored by Matija Obreza's avatar Matija Obreza

Merge branch 'bug-org-cogent' into 'master'

Fix: PDCIStatistics#merge should ignore null input

See merge request genesys-pgr/genesys-server!231
parents 898cb7e0 14bc04c0
...@@ -144,11 +144,12 @@ public class PDCIStatistics implements Serializable { ...@@ -144,11 +144,12 @@ public class PDCIStatistics implements Serializable {
} }
public PDCIStatistics merge(PDCIStatistics other) { public PDCIStatistics merge(PDCIStatistics other) {
updateMin(other.getMin()); if (other != null) {
updateMax(other.getMax()); updateMin(other.getMin());
updateCountAndAvg(other.getCount(), other.getAvg()); updateMax(other.getMax());
updateHistogram(other.getHistogram()); updateCountAndAvg(other.getCount(), other.getAvg());
updateHistogram(other.getHistogram());
}
return this; return this;
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment