Skip to content

Commit 76f080f

Browse files
authored
fix: fixed the duplicates in gradle stack analysis (#103)
Fixed the duplicates in gradle stack analysis. > Describe what you did and why. **Related issue (if any):** fixes #issue_number_goes_here https://issues.redhat.com/browse/APPENG-2425 ## Checklist - [x] I have followed this repository's contributing guidelines. - [x] I will adhere to the project's code of conduct. ## Additional information > Anything else? Signed-off-by: Olga Lavtar <olavtar@redhat.com>
1 parent 5b1848f commit 76f080f

5 files changed

Lines changed: 735 additions & 3424 deletions

File tree

src/main/java/com/redhat/exhort/providers/GradleProvider.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
import java.io.IOException;
3232
import java.nio.file.Files;
3333
import java.nio.file.Path;
34-
import java.time.LocalDateTime;
35-
import java.time.temporal.ChronoUnit;
3634
import java.util.ArrayList;
3735
import java.util.HashMap;
3836
import java.util.List;
@@ -254,6 +252,7 @@ private Sbom buildSbomFromTextFormat(Path textFormatFile, Map<String, String> pr
254252
line = line.replaceAll(":(.*):(.*) -> (.*)$", ":$1:$3");
255253
line = line.replaceAll("(.*):(.*):(.*)$", "$1:$2:jar:$3");
256254
line = line.replaceAll(" \\(n\\)$", "");
255+
line = line.replaceAll(" \\(\\*\\)", "");
257256
line = line.replaceAll("$", ":compile");
258257
array[index] = line;
259258
}

0 commit comments

Comments
 (0)