@@ -95,9 +95,9 @@ public Optional<Delta> calculateCodeDeltaToReference(final Run<?, ?> referenceBu
9595 */
9696 public Set <FileChanges > getCoverageRelevantChanges (final Delta delta ) {
9797 return delta .getFileChangesMap ().values ().stream ()
98- .filter (fileChange -> fileChange .getFileEditType (). equals ( FileEditType .MODIFY )
99- || fileChange .getFileEditType (). equals ( FileEditType .ADD )
100- || fileChange .getFileEditType (). equals ( FileEditType .RENAME ) )
98+ .filter (fileChange -> fileChange .getFileEditType () == FileEditType .MODIFY
99+ || fileChange .getFileEditType () == FileEditType .ADD
100+ || fileChange .getFileEditType () == FileEditType .RENAME )
101101 .collect (Collectors .toSet ());
102102 }
103103
@@ -156,7 +156,7 @@ public Map<String, String> createOldPathMapping(final Node root, final Node refe
156156 Set <String > oldReportPaths = new HashSet <>(referenceRoot .getFiles ());
157157 // mapping between reference and current file paths which initially contains the SCM paths with renamings
158158 Map <String , String > oldPathMapping = changes .entrySet ().stream ()
159- .filter (entry -> FileEditType .RENAME . equals ( entry .getValue ().getFileEditType () ))
159+ .filter (entry -> FileEditType .RENAME == entry .getValue ().getFileEditType ())
160160 .collect (Collectors .toMap (Entry ::getKey , entry -> entry .getValue ().getOldFileName ()));
161161 // the SCM paths and the coverage report paths from the reference
162162 Map <String , String > oldScmToOldReportPathMapping
@@ -246,7 +246,8 @@ private void removeMissingReferences(final Map<String, String> oldPathMapping, f
246246 .map (Entry ::getKey )
247247 .collect (Collectors .toSet ());
248248 if (!pathsWithEmptyReferences .isEmpty ()) {
249- pathsWithEmptyReferences .forEach (oldPathMapping ::remove ); // remove entries which represent missing reference files
249+ pathsWithEmptyReferences .forEach (
250+ oldPathMapping ::remove ); // remove entries which represent missing reference files
250251 var skippedFiles = pathsWithEmptyReferences .stream ()
251252 .limit (20 ) // prevent log overflows
252253 .collect (Collectors .joining ("," + System .lineSeparator ()));
@@ -282,7 +283,8 @@ static void verifyOldPathMapping(final Map<String, String> oldPathMapping, final
282283 .limit (20 ) // prevent log overflows
283284 .map (entry -> "new: '%s' - former: '%s'" .formatted (entry .getKey (), entry .getValue ()))
284285 .collect (Collectors .joining ("," + System .lineSeparator ()));
285- var errorMessage = CODE_DELTA_TO_COVERAGE_DATA_MISMATCH_ERROR_TEMPLATE + System .lineSeparator () + mismatches ;
286+ var errorMessage =
287+ CODE_DELTA_TO_COVERAGE_DATA_MISMATCH_ERROR_TEMPLATE + System .lineSeparator () + mismatches ;
286288 throw new IllegalStateException (errorMessage );
287289 }
288290 log .logInfo ("Successfully verified that the coverage data matches with the code delta" );
0 commit comments