You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expected behaviour for me is NullAway raising an error on line 3, but it raises on line 5.
And if I change method bar to accept @Nullable parameter, NullAway doesn't raise anything at all.
Meta
I'm using com.uber.nullaway:nullaway:0.10.10 with errorprone 3.0.1
Here's my Gradle configuration (inside compileJava):
importnet.ltgt.gradle.errorprone.CheckSeverityplugins {
id 'java'
id 'net.ltgt.errorprone' version '3.0.1'
}
dependencies {
// ...// nullaway
annotationProcessor 'com.uber.nullaway:nullaway:0.10.10'
compileOnly 'com.uber.nullaway:nullaway-annotations:0.10.10'
errorprone "com.google.errorprone:error_prone_core:2.18.0"
}
tasks.named('compileJava', JavaCompile) {
options.encoding 'UTF-8'
options.errorprone {
disableWarningsInGeneratedCode.set(true)
// invalid null check raise error log
check("NullAway", CheckSeverity.ERROR)
// base-package for analyse annotated classes
option("NullAway:AnnotatedPackages", "my.package") // ! line changed due to NDA// exclude generated classes with @Generated
option("NullAway:TreatGeneratedAsUnannotated", true)
// exclude classes with given annotation
option("NullAway:ExcludedClassAnnotations", "lombok.Builder")
// take assertions into consideration
option("NullAway:AssertsEnabled", true)
// exclude unit-tests from checking
option("ExcludedPaths", ".*/src/test/(java|kotlin)/.*")
// annotation is taken not from super class
option("NullAway:ExhaustiveOverride", true)
// libs are scanned and defaults for unannotated// methods is @NotNull Object method(@Nullable param)
option("NullAway:AcknowledgeRestrictiveAnnotations", true)
disable(
"ImmutableEnumChecker",
)
}
}
The text was updated successfully, but these errors were encountered:
Consider the following example:
The expected behaviour for me is NullAway raising an error on line 3, but it raises on line 5.
And if I change method
bar
to accept@Nullable
parameter, NullAway doesn't raise anything at all.Meta
I'm using
com.uber.nullaway:nullaway:0.10.10
with errorprone 3.0.1Here's my Gradle configuration (inside
compileJava
):The text was updated successfully, but these errors were encountered: