0

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)
  • 龙目岛版本:1.16.16
  • 容易出错的版本:2.3.1
  • plexus-compiler-javac-errorprone:2.8.3
4

2 回答 2

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>
于 2021-03-23T11:46:38.103 回答
1

你试过lombok 1.16.20吗?

披露:我是龙目岛开发人员。

于 2018-05-01T09:18:51.900 回答