Lombok表达式错误,容易出错编译
[ERROR] error-prone version: 2.3.1
[ERROR] BugPattern: InconsistentCapitalization
[ERROR] Stack Trace:
[ERROR] java.lang.NullPointerException
[ERROR] at com.google.errorprone.fixes.SuggestedFixes.renameVariable(SuggestedFixes.java)
答案 0 :(得分:1)
你可以试试:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>8</source>
<target>8</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.5.1</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.18</version>
</path>
<!-- Other annotation processors go here.
If 'annotationProcessorPaths' is set, processors will no longer be
discovered on the regular -classpath; see also 'Using Error Prone
together with other annotation processors' below. -->
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
答案 1 :(得分:0)
你试过lombok 1.16.20吗?
披露:我是一名lombok开发者。