Summary:This pull request adds the SuppressViewNullability annotation. The reasoning behind this is that in libraries, one cannot use Butterknife for view binding, which forces you to do it manually. Basically, this makes a new annotation that infer treats the same way as Bind/InjectView Closes https://github.com/facebook/infer/pull/301 Reviewed By: jvillard Differential Revision: D3047235 Pulled By: cristianoc fb-gh-sync-id: 6286d2b shipit-source-id: 6286d2bmaster
parent
beaa9a6925
commit
1c819770e2
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016 - present Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.facebook.infer.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View can be annotated with @SuppressViewNullability to silence warnings when
|
||||||
|
* a view is set to null in a destructor, and created in an initializer.
|
||||||
|
*/
|
||||||
|
@Retention(RetentionPolicy.CLASS)
|
||||||
|
@Target(ElementType.FIELD)
|
||||||
|
public @interface SuppressViewNullability {}
|
Loading…
Reference in new issue