@Test public void nulls_merged_results_in_null() { assertNull(mergerToTest.merge(null, null)); }
public SecHubResult merge(SecHubResult result1, SecHubResult result2) { if (result1==null) { return result2; } if (result2==null) { return result1; } SecHubResult merged = new SecHubResult(); mergeFindings(result1, merged); mergeFindings(result2, merged); mergeFalsePositives(result1, merged); mergeFalsePositives(result2, merged); merged.setCount(result1.getCount()+result2.getCount()); return merged; }
SecHubResultMerger { public SecHubResult merge(SecHubResult result1, SecHubResult result2) { if (result1==null) { return result2; } if (result2==null) { return result1; } SecHubResult merged = new SecHubResult(); mergeFindings(result1, merged); mergeFindings(result2, merged); mergeFalsePositives(result1, merged); mergeFalsePositives(result2, merged); merged.setCount(result1.getCount()+result2.getCount()); return merged; } }
SecHubResultMerger { public SecHubResult merge(SecHubResult result1, SecHubResult result2) { if (result1==null) { return result2; } if (result2==null) { return result1; } SecHubResult merged = new SecHubResult(); mergeFindings(result1, merged); mergeFindings(result2, merged); mergeFalsePositives(result1, merged); mergeFalsePositives(result2, merged); merged.setCount(result1.getCount()+result2.getCount()); return merged; }  }
SecHubResultMerger { public SecHubResult merge(SecHubResult result1, SecHubResult result2) { if (result1==null) { return result2; } if (result2==null) { return result1; } SecHubResult merged = new SecHubResult(); mergeFindings(result1, merged); mergeFindings(result2, merged); mergeFalsePositives(result1, merged); mergeFalsePositives(result2, merged); merged.setCount(result1.getCount()+result2.getCount()); return merged; }  SecHubResult merge(SecHubResult result1, SecHubResult result2); }
SecHubResultMerger { public SecHubResult merge(SecHubResult result1, SecHubResult result2) { if (result1==null) { return result2; } if (result2==null) { return result1; } SecHubResult merged = new SecHubResult(); mergeFindings(result1, merged); mergeFindings(result2, merged); mergeFalsePositives(result1, merged); mergeFalsePositives(result2, merged); merged.setCount(result1.getCount()+result2.getCount()); return merged; }  SecHubResult merge(SecHubResult result1, SecHubResult result2);  }