Skip to content

Commit

Permalink
fix: GitEnricher returns emptymap instead null in case of Exception (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ajayl83 authored Feb 23, 2024
1 parent 7fd9981 commit b4e8b1e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.eclipse.jgit.lib.Repository;

import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

Expand Down Expand Up @@ -63,7 +64,7 @@ private Map<String, String> getAnnotations(PlatformMode platformMode) {
return annotations;
} catch (IOException | GitAPIException e) {
log.error("Cannot extract Git information for adding to annotations: " + e, e);
return null;
return Collections.emptyMap();
}
}

Expand Down

0 comments on commit b4e8b1e

Please sign in to comment.