diff --git a/infer/src/eradicate/eradicate.ml b/infer/src/eradicate/eradicate.ml index b271ba58f..2c07478d9 100644 --- a/infer/src/eradicate/eradicate.ml +++ b/infer/src/eradicate/eradicate.ml @@ -308,6 +308,7 @@ module MkCallback (Extension : ExtensionT) : CallBackT = struct ( match proc_name with | Typ.Procname.Java java_pname -> Typ.Procname.Java.is_access_method java_pname + || Typ.Procname.Java.is_external java_pname | _ -> false ) || (Procdesc.get_attributes proc_desc).ProcAttributes.is_bridge_method diff --git a/infer/tests/codetoanalyze/java/eradicate/issues.exp b/infer/tests/codetoanalyze/java/eradicate/issues.exp index d99d5d5bd..24978132f 100644 --- a/infer/tests/codetoanalyze/java/eradicate/issues.exp +++ b/infer/tests/codetoanalyze/java/eradicate/issues.exp @@ -86,5 +86,3 @@ codetoanalyze/java/eradicate/ReturnNotNullable.java, codetoanalyze.java.eradicat codetoanalyze/java/eradicate/ReturnNotNullable.java, codetoanalyze.java.eradicate.ReturnNotNullable.return_null_in_catch():java.lang.String, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [origin,Method `return_null_in_catch()` may return null but it is not annotated with `@Nullable`. (Origin: null constant at line 109)] codetoanalyze/java/eradicate/ReturnNotNullable.java, codetoanalyze.java.eradicate.ReturnNotNullable.return_null_in_catch_after_throw():java.lang.String, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [origin,Method `return_null_in_catch_after_throw()` may return null but it is not annotated with `@Nullable`. (Origin: null constant at line 121)] codetoanalyze/java/eradicate/ReturnNotNullable.java, codetoanalyze.java.eradicate.ReturnNotNullable.tryWithResourcesReturnNullable(java.lang.String):java.lang.Object, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [origin,Method `tryWithResourcesReturnNullable(...)` may return null but it is not annotated with `@Nullable`. (Origin: call to returnNullOK() at line 90)] -external/library/SomeExternalClass.java, external.library.SomeExternalClass.(), 0, ERADICATE_FIELD_NOT_INITIALIZED, no_bucket, WARNING, [Field `SomeExternalClass.field` is not initialized in the constructor and is not declared `@Nullable`] -external/library/SomeExternalClass.java, external.library.SomeExternalClass.externalMethod1():java.lang.Object, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [origin,Method `externalMethod1()` may return null but it is not annotated with `@Nullable`. (Origin: null constant at line 16)]