diff --git a/dhp-workflows/dhp-patch/src/main/java/eu/dnetlib/dhp/patchrefereed/SparkPatchRefereed.java b/dhp-workflows/dhp-patch/src/main/java/eu/dnetlib/dhp/patchrefereed/SparkPatchRefereed.java index 5390a9f906..2dd0bfe2ca 100644 --- a/dhp-workflows/dhp-patch/src/main/java/eu/dnetlib/dhp/patchrefereed/SparkPatchRefereed.java +++ b/dhp-workflows/dhp-patch/src/main/java/eu/dnetlib/dhp/patchrefereed/SparkPatchRefereed.java @@ -153,24 +153,30 @@ public class SparkPatchRefereed implements Serializable { return false; } + //TODO verify the reason of the NullPointerException fired at line 167 private static boolean equals(List url, List url1) { - if (url == null && url1 == null) { - return true; - } + try{ + if (url == null && url1 == null) { + return true; + } - if ((url1 == null && url != null) || (url != null && url1 == null)) { - return false; - } - - if (url.size() != url1.size()) { - return false; - } - for (String u : url) { - if (!url1.contains(u)) { + if ((url1 == null && url != null) || (url != null && url1 == null)) { return false; } + + if (url.size() != url1.size()) { + return false; + } + for (String u : url) { + if (!url1.contains(u)) { + return false; + } + } + return true; + }catch(Exception e){ + return false; } - return true; + } public static Dataset readPath(