From 7c31cacdb3aefb512e7661d6274f47bdeadfb70e Mon Sep 17 00:00:00 2001 From: Christian Meusel Date: Wed, 2 Sep 2020 18:22:21 +0200 Subject: [PATCH] Allow merging null values Optional OCMF fields like GV should be merged successfully even when their values are null. --- .../verification/result/VerificationResult.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/hastobe/transparenzsoftware/verification/result/VerificationResult.java b/src/main/java/com/hastobe/transparenzsoftware/verification/result/VerificationResult.java index b5e74db..7b1402e 100644 --- a/src/main/java/com/hastobe/transparenzsoftware/verification/result/VerificationResult.java +++ b/src/main/java/com/hastobe/transparenzsoftware/verification/result/VerificationResult.java @@ -113,7 +113,7 @@ public static VerificationResult mergeVerificationData(VerificationResult start, for (String key : start.getAdditionalVerificationData().keySet()) { Object o1 = start.getAdditionalVerificationData().get(key); Object o2 = stop.getAdditionalVerificationData().get(key); - if (o1.equals(o2)) { + if (o1 == o2 || (o1 != null && o1.equals(o2))) { additionalDataMerged.put(key, o1); } else { additionalDataMerged.put(String.format("%s (start)", key), o1);