Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see all the possible Null pointer exception lints in my code?

I use both Kotlin and Java in my code, because of the Kotlin's flexible nullability, I get method invocation ... may produce java.lang.NullPointerException lints in my code,

I run Code inspection in my project, it displays

  • Android Lint: Accessibility
  • Android Lint: Correctness
  • Android Lint: Internationalization
  • Android Lint: Performance

and

  • Android Lint: Usability

none of them lists the possible NPE lints? Is there a place to list those lints?

like image 806
Ege Kuzubasioglu Avatar asked Jan 29 '23 04:01

Ege Kuzubasioglu


1 Answers

I just realized when you inspect code in Android Studio there is a section called Probable bugs

under this section there is Constant conditions & exceptions

and it displays all the NPE lints, not specifically for NPE but it may help in this case.

like image 128
Ege Kuzubasioglu Avatar answered Jan 31 '23 20:01

Ege Kuzubasioglu