Commit 5fba3317 authored by Romain Bioteau's avatar Romain Bioteau

fix(java11) set compiler java compliance to 1.8

parent 0961a579
...@@ -77,6 +77,7 @@ public class ProjectClasspathFactoryTest { ...@@ -77,6 +77,7 @@ public class ProjectClasspathFactoryTest {
doReturn(executionEnvironment).when(bonitaBPMProjectClasspath).javaRuntimeEnvironment(); doReturn(executionEnvironment).when(bonitaBPMProjectClasspath).javaRuntimeEnvironment();
doReturn(javaProject).when(bonitaBPMProjectClasspath).asJavaProject(repository); doReturn(javaProject).when(bonitaBPMProjectClasspath).asJavaProject(repository);
doReturn(newArrayList(aSourceRepositoryStore(), aRepositoryStore())).when(repository).getAllStores(); doReturn(newArrayList(aSourceRepositoryStore(), aRepositoryStore())).when(repository).getAllStores();
doNothing().when(bonitaBPMProjectClasspath).updateCompilerJavaCompliance(notNull(String.class));
} }
private IRepositoryStore<?> aSourceRepositoryStore() { private IRepositoryStore<?> aSourceRepositoryStore() {
......
...@@ -59,7 +59,7 @@ public class ProjectClasspathFactory { ...@@ -59,7 +59,7 @@ public class ProjectClasspathFactory {
updateCompilerJavaCompliance(CompilerOptions.VERSION_1_8); updateCompilerJavaCompliance(CompilerOptions.VERSION_1_8);
} }
private void updateCompilerJavaCompliance(String javaVersion) { protected void updateCompilerJavaCompliance(String javaVersion) {
Hashtable<String, String> options = JavaCore.getOptions(); Hashtable<String, String> options = JavaCore.getOptions();
options.put(CompilerOptions.OPTION_TargetPlatform, javaVersion); options.put(CompilerOptions.OPTION_TargetPlatform, javaVersion);
options.put(CompilerOptions.OPTION_Source, javaVersion); options.put(CompilerOptions.OPTION_Source, javaVersion);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment