Skip to content

Commit 7f9864c

Browse files
committed
Resolve #211, #230: Java8switch
Merge branch 'hbz-java8switch' Cherry-picked commits from pull request: - Make metafcature-core build on Java 8: switch to antlr3.5.2 - Make travis use the right Java version - make the GC wait a little longer in UnitTest for travis...
2 parents 6759c63 + 44bff6a commit 7f9864c

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: java
22
jdk:
3-
- openjdk6
3+
- oraclejdk8
44

55
env:
66
global:

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<properties>
6262
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6363
<targetJdk>1.6</targetJdk>
64-
<antlr.version>3.5.1</antlr.version>
64+
<antlr.version>3.5.2</antlr.version>
6565
</properties>
6666

6767
<scm>

src/test/java/org/culturegraph/mf/stream/pipe/sort/AbstractTripleSortTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ public void shouldNotFailIfFlushingBeforeFirstRecord() {
5858
* This test case may throw fail unexpectedly as it relies on the
5959
* garbage collector to run when calling {@code System.gc()}. This
6060
* is not guaranteed by the JVM.
61+
*
62+
* @throws InterruptedException
6163
*/
6264
@Test
63-
public void issue192ShouldUnregisterFromTheJVMToNotCauseMemoryLeak() {
65+
public void issue192ShouldUnregisterFromTheJVMToNotCauseMemoryLeak() throws InterruptedException {
6466

6567
// Get weak reference for checking whether the object was actually freed later:
6668
final ReferenceQueue<AbstractTripleSort> refQueue = new ReferenceQueue<AbstractTripleSort>();
@@ -71,6 +73,9 @@ public void issue192ShouldUnregisterFromTheJVMToNotCauseMemoryLeak() {
7173

7274
System.gc();
7375

76+
// Wait a tiny bit since GC Thread is not immediately done in Java 8
77+
Thread.sleep(10);
78+
7479
assertTrue(weakRef.isEnqueued());
7580
}
7681

0 commit comments

Comments
 (0)