这是我的错误(是的,commons-lang3 jira 上有一个开放的错误)。
found : @Initialized @Nullable Console
required: @Initialized @NonNull Console
/Users/calebcushing/IdeaProjects/ppm/scaf/src/main/java/com/xenoterracide/scaf/PebbleTemplateProcessor.java:96: error: [argument.type.incompatible] incompatible argument for parameter str of toBoolean.
if ( BooleanUtils.toBoolean( line ) ) {
我试着做这个src/java/main/org/apache/commons/lang3/BooleanUtils.astub
,我试着把那个文件放进去src/main/resources/
package org.apache.commons.lang3;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
public class BooleanUtils {
@NonNull
public static boolean toBoolean( @Nullable final String str);
}
但我并将其添加到我的 gradle 配置中
extraJavacArgs.addAll(listOf(
"-Werror",
"-Astubs=BooleanUtils.astub:stubs"
))
但我明白了
warning: Did not find stub file BooleanUtils.astub on classpath or within current directory
warning: Did not find stub file stubs on classpath or within current directory
我该如何解决这个问题?