Summary: This allows Eradicate to detect more issues related to inconsistent annotations with sub-typing.
Reviewed By: ngorogiannis
Differential Revision: D9807306
fbshipit-source-id: 159d5d4e8
master
Jeremy Dubreil6 years agocommitted byFacebook Github Bot
infer/tests/build_systems/genrule/module1/Class1.java, genrule.module1.Class1.localNPE1():void, 2, ERADICATE_NULL_METHOD_CALL, no_bucket, WARNING, [origin,The value of `obj` in the call to `toString()` could be null. (Origin: null constant at line 24)]
infer/tests/build_systems/genrule/module1/Class1.java, genrule.module1.Class1.unannotatedReturnNull():java.lang.Object, 0, ERADICATE_RETURN_NOT_NULLABLE, no_bucket, WARNING, [origin,Method `unannotatedReturnNull()` may return null but it is not annotated with `@Nullable`. (Origin: null constant at line 33)]
infer/tests/build_systems/genrule/module2/Class2.java, genrule.module2.Class2$Sub.subtypingInconsistency(java.lang.Object):java.lang.Object, 0, ERADICATE_INCONSISTENT_SUBCLASS_PARAMETER_ANNOTATION, no_bucket, WARNING, [First parameter `object` of method `Class2$Sub.subtypingInconsistency(...)` is not `@Nullable` but is declared `@Nullable`in the parent class method `Class1$Sub.subtypingInconsistency(...)`.]
infer/tests/build_systems/genrule/module2/Class2.java, genrule.module2.Class2$Sub.subtypingInconsistency(java.lang.Object):java.lang.Object, 0, ERADICATE_INCONSISTENT_SUBCLASS_RETURN_ANNOTATION, no_bucket, WARNING, [Method `Class2$Sub.subtypingInconsistency(...)` is annotated with `@Nullable` but overrides unannotated method `Class1$Sub.subtypingInconsistency(...)`.]
infer/tests/build_systems/genrule/module2/Class2.java, genrule.module2.Class2.dereferenceInterTargetField1Bad(genrule.module1.Class1):void, 1, ERADICATE_NULL_METHOD_CALL, no_bucket, WARNING, [origin,The value of `class1.field1` in the call to `toString()` could be null. (Origin: field Class1.field1 at line 53)]
infer/tests/build_systems/genrule/module2/Class2.java, genrule.module2.Class2.dereferenceInterTargetField2Bad(genrule.module1.Class1):int, 1, ERADICATE_NULL_FIELD_ACCESS, no_bucket, WARNING, [origin,Object `class1.field2` could be null when accessing field `Class1.x`. (Origin: field Class1.field2 at line 57)]
infer/tests/build_systems/genrule/module2/Class2.java, genrule.module2.Class2.dereferenceLocalNullableFieldBad():void, 1, ERADICATE_NULL_METHOD_CALL, no_bucket, WARNING, [origin,The value of `Class2.field` in the call to `toString()` could be null. (Origin: field Class2.field at line 49)]
infer/tests/build_systems/genrule/module2/Class2.java, genrule.module2.Class2$Sub.subtypingInconsistency(java.lang.Object):java.lang.Object, 0, ERADICATE_INCONSISTENT_SUBCLASS_PARAMETER_ANNOTATION, no_bucket, WARNING, [First parameter `object` of method `Class2$Sub.subtypingInconsistency(...)` is not `@Nullable` but is declared `@Nullable`in the parent class method `Class1$Sub.subtypingInconsistency(...)`.]
infer/tests/build_systems/genrule/module2/Class2.java, genrule.module2.Class2$Sub.subtypingInconsistency(java.lang.Object):java.lang.Object, 0, ERADICATE_INCONSISTENT_SUBCLASS_RETURN_ANNOTATION, no_bucket, WARNING, [Method `Class2$Sub.subtypingInconsistency(...)` is annotated with `@Nullable` but overrides unannotated method `Class1$Sub.subtypingInconsistency(...)`.]
infer/tests/build_systems/genrule/module2/Class2.java, genrule.module2.Class2.dereferenceInterTargetField1Bad(genrule.module1.Class1):void, 1, ERADICATE_NULL_METHOD_CALL, no_bucket, WARNING, [origin,The value of `class1.field1` in the call to `toString()` could be null. (Origin: field Class1.field1 at line 53)]
infer/tests/build_systems/genrule/module2/Class2.java, genrule.module2.Class2.dereferenceInterTargetField2Bad(genrule.module1.Class1):int, 1, ERADICATE_NULL_FIELD_ACCESS, no_bucket, WARNING, [origin,Object `class1.field2` could be null when accessing field `Class1.x`. (Origin: field Class1.field2 at line 57)]
infer/tests/build_systems/genrule/module2/Class2.java, genrule.module2.Class2.dereferenceLocalNullableFieldBad():void, 1, ERADICATE_NULL_METHOD_CALL, no_bucket, WARNING, [origin,The value of `Class2.field` in the call to `toString()` could be null. (Origin: field Class2.field at line 49)]