Skip to content

Commit

Permalink
moditect#27 Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarmorling committed Jan 24, 2019
1 parent 7bfae73 commit b46f323
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.moditect.deptective.internal.graph.impl.Tarjan;

/**
*
* @author Gerd Wütherich (gw@code-kontor.io)
*/
public class GraphUtils {
Expand All @@ -40,7 +39,8 @@ public class GraphUtils {
*
* @param nodes the collection of nodes (the directed graph)
* @return a list of strongly connected components (SCCs). Note that the result also contains components that
* contain just a single node. If you want to detect 'real' cycle (size > 1) please use {@link GraphUtils#detectCycles(Collection)}.
* contain just a single node. If you want to detect 'real' cycle (size > 1) please use
* {@link GraphUtils#detectCycles(Collection)}.
*/
public static List<List<Node>> detectStronglyConnectedComponents(Collection<Node> nodes) {
return new Tarjan<Node>().detectStronglyConnectedComponents(Objects.requireNonNull(nodes));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public Dependency getOutgoingDependencyTo(Node node) {
}

public Set<Dependency> getOutgoingDependenciesTo(Collection<Node> nodes) {
return Objects.requireNonNull(nodes).stream().map(node -> getOutgoingDependencyTo(node)).filter(dep -> dep != null)
return Objects.requireNonNull(nodes).stream().map(node -> getOutgoingDependencyTo(node))
.filter(dep -> dep != null)
.collect(Collectors.toSet());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.junit.Test;

/**
*
* @author Gerd W&uuml;therich (gw@code-kontor.io)
*/
public class CyclesTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.junit.Test;

/**
*
* @author Gerd W&uuml;therich (gw@code-kontor.io)
*/
public class DependencyStructureMatrixTest {
Expand All @@ -41,7 +40,7 @@ public void detectCycle() {
nodes.get(0), nodes.get(1), nodes.get(2),
nodes.get(3)
);

// assert upward dependencies
assertThat(dsm.getUpwardDependencies()).hasSize(1)
.containsExactly(nodes.get(3).getOutgoingDependencyTo(nodes.get(2)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.junit.Test;

/**
*
* @author Gerd W&uuml;therich (gw@code-kontor.io)
*/
public class StronglyConnectedComponentsTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@
import org.moditect.deptective.internal.graph.Node;

/**
*
* @author Gerd W&uuml;therich (gw@code-kontor.io)
*/
public class TestModelCreator {

/**
*
* @return
*/
public static List<Node> createDummyModel() {
Expand Down

0 comments on commit b46f323

Please sign in to comment.