Skip to content

Commit

Permalink
Merge pull request #297 from aloubyansky/add-back-release-repo-id
Browse files Browse the repository at this point in the history
Add back and deprecate some methods removed by accident
  • Loading branch information
aloubyansky authored Nov 9, 2023
2 parents 4915743 + 04dd7be commit 697ffcd
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package io.quarkus.domino;

import io.quarkus.bom.decomposer.ReleaseId;
import io.quarkus.domino.scm.ScmRevision;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

Expand All @@ -22,10 +24,24 @@ private CircularReleaseDependency(List<ScmRevision> chain) {
this.chain = List.copyOf(chain);
}

public List<ScmRevision> getReleaseDependencyChain() {
public List<ScmRevision> getDependencyChain() {
return chain;
}

/**
* @deprecated for removal in favor of {@link #getDependencyChain()}
*
* @return chain of dependencies that form a loop
*/
@Deprecated(forRemoval = true)
public List<ReleaseId> getReleaseDependencyChain() {
var result = new ArrayList<ReleaseId>(chain.size());
for (var r : chain) {
result.add(r);
}
return result;
}

@Override
public String toString() {
var sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ public void log() {
int i = 0;
while (chains.hasNext()) {
logComment(" Chain #" + ++i + ":");
chains.next().getReleaseDependencyChain().forEach(id -> logComment(" " + id));
chains.next().getDependencyChain().forEach(id -> logComment(" " + id));
logComment("");
}
}
Expand Down
11 changes: 11 additions & 0 deletions domino/api/src/main/java/io/quarkus/domino/ReleaseRepo.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.quarkus.domino;

import io.quarkus.bom.decomposer.ReleaseId;
import io.quarkus.domino.scm.ScmRevision;
import io.quarkus.maven.dependency.ArtifactCoords;
import java.util.Collection;
Expand All @@ -20,6 +21,16 @@ public class ReleaseRepo {
this.revision = revision;
}

/**
* @deprecated for removal in favor of {@link #getRevision()}
*
* @return release id
*/
@Deprecated(forRemoval = true)
public ReleaseId id() {
return revision;
}

public ScmRevision getRevision() {
return revision;
}
Expand Down

0 comments on commit 697ffcd

Please sign in to comment.