Skip to content

Commit 87af3c8

Browse files
committed
set jdk to 1.7
1 parent fa707e8 commit 87af3c8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<artifactId>maven-compiler-plugin</artifactId>
1515
<version>2.5.1</version>
1616
<configuration>
17-
<source>1.8</source>
18-
<target>1.8</target>
17+
<source>1.7</source>
18+
<target>1.7</target>
1919
</configuration>
2020
</plugin>
2121
</plugins>

src/main/java/cn/codepub/algorithms/graph/Kruskal.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import org.junit.Test;
55

66
import java.util.*;
7-
import java.util.stream.Collectors;
87

98
/**
109
* <p>
@@ -89,7 +88,8 @@ public int compare(Object o1, Object o2) {
8988
});
9089

9190
// 加入优先级队列
92-
queue.addAll(edgeList.stream().collect(Collectors.toList()));
91+
queue.addAll(edgeList);
92+
// queue.addAll(edgeList.stream().collect(Collectors.toList()));
9393
while (!queue.isEmpty()) {
9494
Edge remove = queue.remove();
9595
Vertex start = remove.start;//获取起始点

0 commit comments

Comments
 (0)