Add a test case with @SuppressWarnings on a Buck project

Reviewed By: @jvillard

Differential Revision: D2520034

fb-gh-sync-id: 830d504
master
jrm 9 years ago committed by facebook-github-bot-1
parent 2d074e82dc
commit 3095b68127

@ -612,5 +612,10 @@
"type": "RESOURCE_LEAK", "type": "RESOURCE_LEAK",
"procedure": "void WriterLeaks.pipedWriterNotClosedAfterConnect(PipedReader)", "procedure": "void WriterLeaks.pipedWriterNotClosedAfterConnect(PipedReader)",
"file": "codetoanalyze/java/infer/WriterLeaks.java" "file": "codetoanalyze/java/infer/WriterLeaks.java"
},
{
"type": "NULL_DEREFERENCE",
"procedure": "void NullPointerExceptions.shouldNotReportNPE()",
"file": "codetoanalyze/java/infer/NullPointerExceptions.java"
} }
] ]

@ -419,4 +419,10 @@ public class NullPointerExceptions {
derefUndefinedCallee().toString(); derefUndefinedCallee().toString();
} }
@SuppressWarnings("null") // TODO(#8647398): Add support for @SuppressWarnings with Ant
void shouldNotReportNPE() {
Object o = null;
o.toString();
}
} }

Loading…
Cancel
Save