Skip to content

Commit

Permalink
remove debugging stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mherman22 committed Aug 27, 2024
1 parent 1d49533 commit 5de2232
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ private List<ArtifactVersion> getVersions(Artifact artifact){
public List<ArtifactVersion> getAllVersions(Artifact artifact, int maxSize) {
List<ArtifactVersion> versions = getVersions(artifact);
sortDescending(versions);
System.out.println("Initial Versions: " + versions);
Optional<ArtifactVersion> firstNonSnapshotVersion = versions.stream()
.filter(version -> !version.toString().endsWith("-SNAPSHOT"))
.findFirst();
Expand All @@ -82,10 +81,7 @@ public List<ArtifactVersion> getAllVersions(Artifact artifact, int maxSize) {
&& new ComparableVersion(version.toString()).compareTo(new ComparableVersion(firstNonSnapshot.toString())) < 0);
}

List<ArtifactVersion> result = versions.subList(0, Math.min(versions.size(), maxSize));
System.out.println("Filtered Versions: " + result);

return result;
return versions.subList(0, Math.min(versions.size(), maxSize));
}

private void sortDescending(List<ArtifactVersion> versions){
Expand Down

0 comments on commit 5de2232

Please sign in to comment.