I need to use @ExtensionMethod but I have “cannot find symbol” for extension methods when I compile project.
spring boot, java 11
for example I have:
import lombok.experimental.ExtensionMethod;
@SuppressWarnings("checkstyle:MissingJavadocMethod")
@ExtensionMethod(TestUtility.class)
public class TestUtility {
public static String test(String a) {
return a.toLowerCase().test2();
}
public static String test2(String a) {
return a.toUpperCase();
}
}
and I get compile error for return a.toLowerCase().test2();
:
tried with different maven-compiler-plugin and lombok versions
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>11</source>
<target>11</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>