diff --git a/xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/execution/RunEmrJob.java b/xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/execution/RunEmrJob.java index 21cf3cff2..84ca528f8 100644 --- a/xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/execution/RunEmrJob.java +++ b/xyz-jobs/xyz-job-steps/src/main/java/com/here/xyz/jobs/steps/execution/RunEmrJob.java @@ -204,13 +204,13 @@ public boolean isEquivalentTo(StepExecution other) { //TODO: For now do not compare the actual values of the positional params until the full fledged inputSet comparison was implemented for the GraphFusion && Objects.equals(otherEmrStep.positionalScriptParams.size(), positionalScriptParams.size()) //TODO: For now do not compare the actual values of the positional that contain an inputSet reference until the full fledged inputSet comparison was implemented for the GraphFusion - && Objects.equals(otherEmrStep.namedScriptParams, namedScriptParams) + && isEquivalentTo(namedScriptParams, otherEmrStep.namedScriptParams) && Objects.equals(otherEmrStep.sparkParams, sparkParams); } private boolean isEquivalentTo(Map namedScriptParams, Map otherNamedScriptParams) { return Objects.equals(namedScriptParams.keySet(), otherNamedScriptParams.keySet()) && - namedScriptParams.entrySet().stream() + namedScriptParams != null && otherNamedScriptParams != null && namedScriptParams.entrySet().stream() .allMatch(entry -> isEquivalentTo(namedScriptParams.get(entry.getKey()), otherNamedScriptParams.get(entry.getKey()))); } diff --git a/xyz-models/src/main/java/com/here/xyz/util/KeyValue.java b/xyz-models/src/main/java/com/here/xyz/util/KeyValue.java index c1a7a140a..bf47657ad 100644 --- a/xyz-models/src/main/java/com/here/xyz/util/KeyValue.java +++ b/xyz-models/src/main/java/com/here/xyz/util/KeyValue.java @@ -30,7 +30,7 @@ public KeyValue putToMap(Map map) { } public Map extendMap(Map map) { - Map extended = new HashMap<>(); + Map extended = new HashMap<>(map); putToMap(extended); return extended; }