Fix function id comparison exception
@@ -49,7 +49,7 @@ public class OnboardingNotificationEmailContentFormatter extends BaseEmailConten
}
if (anomalyFunctionSpec == null) {
anomalyFunctionSpec = ((MergedAnomalyResultDTO) anomalyResult).getFunction();
- } else if (anomalyFunctionSpec.getId() != ((MergedAnomalyResultDTO) anomalyResult).getFunction().getId()) {
+ } else if (!anomalyFunctionSpec.getId().equals(((MergedAnomalyResultDTO) anomalyResult).getFunction().getId())) {
throw new IllegalArgumentException("Input anomalies should be generated by the same anomaly function");
}
}
