Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Littley <cody@swirldslabs.com>
  • Loading branch information
Cody Littley committed Dec 1, 2023
1 parent 5502f35 commit 5001117
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ public boolean isInsertionIsBlocking() {
return true;

Check warning on line 85 in platform-sdk/swirlds-common/src/main/java/com/swirlds/common/wiring/model/internal/GroupVertex.java

View check run for this annotation

Codecov / codecov/patch

platform-sdk/swirlds-common/src/main/java/com/swirlds/common/wiring/model/internal/GroupVertex.java#L85

Added line #L85 was not covered by tests
}

/**
* {@inheritDoc}
*/
@Override
public void connectToEdge(@NonNull final ModelEdge edge) {}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ public interface ModelVertex extends Comparable<ModelVertex> {
*/
boolean isInsertionIsBlocking();

/**
* Add an outgoing edge to this vertex.
*
* @param edge the edge to connect to
*/
void connectToEdge(@NonNull final ModelEdge edge); // TODO redundant?

/**
* Get the outgoing edges of this vertex.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,6 @@ public boolean isInsertionIsBlocking() {
return insertionIsBlocking;
}

/**
* {@inheritDoc}
*/
@Override
public void connectToEdge(@NonNull final ModelEdge edge) { // TODO is this redundant?
outgoingEdges.add(Objects.requireNonNull(edge));
}

/**
* {@inheritDoc}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void registerEdge(
final boolean blocking = blockingEdge && destination.isInsertionIsBlocking();

final ModelEdge edge = new ModelEdge(origin, destination, label, blocking);
origin.connectToEdge(edge);
origin.getOutgoingEdges().add(edge);

final boolean unique = edges.add(edge);
if (!unique) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private Map<String, ModelVertex> copyVertexMap(@NonNull final Map<String, ModelV
final ModelEdge edgeCopy =
new ModelEdge(source, destination, edge.getLabel(), edge.isInsertionIsBlocking());

source.connectToEdge(edgeCopy);
source.getOutgoingEdges().add(edgeCopy);
}
}

Expand Down

0 comments on commit 5001117

Please sign in to comment.