Skip to content

Commit 5dbe9ec

Browse files
committed
Remove annotation processing which cause warnings on jdk21
1 parent fbae296 commit 5dbe9ec

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

plexus-compilers/plexus-compiler-javac/src/test/java/org/codehaus/plexus/compiler/javac/JavacCompilerTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.codehaus.plexus.compiler.javac;
22

3+
import org.codehaus.plexus.compiler.CompilerConfiguration;
34
import org.codehaus.plexus.compiler.CompilerMessage;
45
import org.junit.jupiter.api.BeforeEach;
56
import org.junit.jupiter.api.Test;
@@ -44,6 +45,13 @@ public void setUp()
4445
setForceJavacCompilerUse( true );
4546
}
4647

48+
protected void configureCompilerConfig( CompilerConfiguration compilerConfig )
49+
{
50+
if (getJavaVersion().contains("21")) {
51+
compilerConfig.setProc("none");
52+
}
53+
}
54+
4755
@Test
4856
void parseModernStream_withAnnotationProcessingErrors() throws IOException
4957
{

plexus-compilers/plexus-compiler-javac/src/test/java/org/codehaus/plexus/compiler/javac/JavaxToolsCompilerTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,21 @@
1818
* under the License.
1919
*/
2020

21+
import org.codehaus.plexus.compiler.CompilerConfiguration;
22+
2123
/**
2224
* @author Olivier Lamy
2325
*/
2426
public class JavaxToolsCompilerTest
2527
extends AbstractJavacCompilerTest
2628
{
2729
// no op default is to javax.tools if available
30+
31+
protected void configureCompilerConfig( CompilerConfiguration compilerConfig )
32+
{
33+
if (getJavaVersion().contains("21")) {
34+
compilerConfig.setProc("none");
35+
}
36+
}
37+
2838
}

0 commit comments

Comments
 (0)