Skip to content

Commit

Permalink
Fix build failure with JDK 9 EA b148 (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
Godin authored and marchof committed Dec 15, 2016
1 parent 055e8e4 commit 2bc56b2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.sh
Expand Up @@ -85,6 +85,9 @@ case "$JDK" in
mvn -V -B -e verify -Dbytecode.version=1.8
;;
9-ea | 9-ea-stable)
# Groovy version should be updated to get rid of "--add-opens" options (see https://twitter.com/CedricChampeau/status/807285853580103684)
export MAVEN_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED"

# see https://bugs.openjdk.java.net/browse/JDK-8131041 about "java.locale.providers"
mvn -V -B -e verify -Dbytecode.version=1.9 \
-DargLine=-Djava.locale.providers=JRE,SPI
Expand Down
Expand Up @@ -11,6 +11,9 @@
*******************************************************************************/
package org.jacoco.core.runtime;

import org.junit.Assume;
import org.junit.BeforeClass;

/**
* Unit tests for {@link URLStreamHandlerRuntime}.
*/
Expand All @@ -21,4 +24,11 @@ IRuntime createRuntime() {
return new URLStreamHandlerRuntime();
}

@BeforeClass
public static void checkJDK() {
final boolean jdk9 = System.getProperty("java.version")
.startsWith("9-");
Assume.assumeTrue(!jdk9);
}

}

0 comments on commit 2bc56b2

Please sign in to comment.