Commit 6efa82c8 by 吴斌

跳过 calculateDeltaNode 对于负值的检验

parent 6f30d5d9
......@@ -96,10 +96,10 @@ public class CalculateDeltaNode implements TbNode {
BigDecimal delta = BigDecimal.valueOf(previousData != null ? currentValue - previousData.value : 0.0);
if (config.isTellFailureIfDeltaIsNegative() && delta.doubleValue() < 0) {
ctx.tellFailure(msg, new IllegalArgumentException("Delta value is negative!"));
return;
}
// if (config.isTellFailureIfDeltaIsNegative() && delta.doubleValue() < 0) {
// ctx.tellFailure(msg, new IllegalArgumentException("Delta value is negative!"));
// return;
// }
if (config.getRound() != null) {
delta = delta.setScale(config.getRound(), RoundingMode.HALF_UP);
......
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