Skip to content

Commit

Permalink
Add support for JDK 11 as runtime environment
Browse files Browse the repository at this point in the history
- bump asm version to 6.2 to add support for java 11.
- remove java.xml.bind since it's removed as part of https://bugs.openjdk.java.net/browse/JDK-8189188
- update DiagnosticReportCommandTest to have a specific parameter for java 11
  because of https://bugs.openjdk.java.net/browse/JDK-8202127 and current
  surefire behavior
  • Loading branch information
MishaDemianenko committed Jun 25, 2018
1 parent 0d62e08 commit 8b59e63
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Expand Up @@ -23,6 +23,7 @@
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.jupiter.api.condition.JRE;
import org.junit.rules.ExpectedException;

import java.io.ByteArrayOutputStream;
Expand Down Expand Up @@ -206,7 +207,9 @@ public void listShouldDisplayAllClassifiers() throws Exception
@Test
public void overrideDestination() throws Exception
{
String[] args = {"--to=other/", "all"};
// because of https://bugs.openjdk.java.net/browse/JDK-8202127 and current surefire behaviour we need to have custom value for JRE >= 11
String toArgument = JRE.JAVA_11.isCurrentVersion() ? "--to=" + System.getProperty( "user.dir" ) + "/other/" : "--to=other/";
String[] args = {toArgument, "all"};
try ( RealOutsideWorld outsideWorld = new RealOutsideWorld() )
{
DiagnosticsReportCommand
Expand Down
Expand Up @@ -23,6 +23,7 @@
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.jupiter.api.condition.JRE;

import java.util.stream.Stream;
import javax.lang.model.element.Element;
Expand Down Expand Up @@ -128,8 +129,9 @@ public void functions_with_non_annotated_parameters_are_invalid()

Stream<CompilationMessage> errors = visitor.visit( function );

String errorMessage = JRE.JAVA_11.isCurrentVersion() ? "@org.neo4j.procedure.Name usage error: missing on parameter <oops>"
: "@org.neo4j.procedure.Name usage error: missing on parameter <arg1>";
assertThat( errors ).hasSize( 1 ).extracting( CompilationMessage::getCategory, CompilationMessage::getContents )
.contains( tuple( Diagnostic.Kind.ERROR,
"@org.neo4j.procedure.Name usage error: missing on parameter <arg1>" ) );
.contains( tuple( Diagnostic.Kind.ERROR, errorMessage ) );
}
}
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -91,7 +91,7 @@
<scala-maven-plugin.version>3.3.2</scala-maven-plugin.version>
<scala.version>2.11.12</scala.version>
<scala.binary.version>2.11</scala.binary.version>
<asm.version>6.1.1</asm.version>
<asm.version>6.2</asm.version>
<metrics.version>4.0.2</metrics.version>
<scala.target.vm>1.8</scala.target.vm>
<scala.java.additional.args/>
Expand Down Expand Up @@ -935,7 +935,7 @@
<jdk>[9, )</jdk>
</activation>
<properties>
<java.exports>--add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-modules java.xml.bind</java.exports>
<java.exports>--add-exports=java.base/sun.nio.ch=ALL-UNNAMED</java.exports>
<maven.javadoc.skip>true</maven.javadoc.skip>
<scala.java.additional.args>-nobootcp</scala.java.additional.args>
</properties>
Expand Down

0 comments on commit 8b59e63

Please sign in to comment.