Android studio seems to think SparseArray values cannot be null.
When I write
public static void foo() { SparseArray<Object> sparseArray = new SparseArray<Object>(); sparseArray.put(0, null); if (sparseArray.valueAt(0) == null) Log.d("MyClass", "Hello World"); } I get the warning
condition 'sparseArray.valueAt(0) == null' is always 'false'
I'd just like to know what annotation or comment I need to put to get rid of the warning. I don't want to disable inspections, just get rid of this particular warning. Thanks.