- } else {
- // validate each threshold must have non null - fieldPath, thresholdValue, direction and severity
- for (Threshold eventNameThreshold : thresholds) {
- final String fieldPath = eventNameThreshold.getFieldPath();
- final Long thresholdValue = eventNameThreshold.getThresholdValue();
- final Direction direction = eventNameThreshold.getDirection();
- final EventSeverity severity = eventNameThreshold.getSeverity();
- final ClosedLoopEventStatus closedLoopEventStatus = eventNameThreshold.getClosedLoopEventStatus();
- if (isEmpty(fieldPath) || thresholdValue == null || direction == null || severity == null ||
+ } else {
+ // validate each threshold must have non null - fieldPath, thresholdValue, direction and severity
+ for (Threshold eventNameThreshold : thresholds) {
+ final String fieldPath = eventNameThreshold.getFieldPath();
+ final Long thresholdValue = eventNameThreshold.getThresholdValue();
+ final Direction direction = eventNameThreshold.getDirection();
+ final EventSeverity severity = eventNameThreshold.getSeverity();
+ final ClosedLoopEventStatus closedLoopEventStatus = eventNameThreshold.getClosedLoopEventStatus();
+ if (isEmpty(fieldPath) || thresholdValue == null || direction == null || severity == null ||