Android @NonNull usefulness

前端 未结 3 2203
生来不讨喜
生来不讨喜 2021-02-12 09:40

After a few reading and questions like this one I was wondering if there was a point in using @NonNull Android Support Annotation.

I can see a very small war

3条回答
  •  名媛妹妹
    2021-02-12 10:27

    It might be too late to comment, but better later than never :)

    There is a Traute javac plugin which inserts null-checks into generated bytecode based on method parameter's annotations.

    Here is a sample Android project which illustrates that.

提交回复
热议问题