android - cursor.getLong(1) not throwing Exception -


i have field in database null when retrieve in cursor null. can tell

cursor.isnull(1) true when cursor.getlong(1) should throw exception according documentation. retrieves 0 without , exception. ideas why?

if take @ implementation of method getlong() in matrixcursor , can see following code:

    @override public long getlong(int column) {     object value = get(column);     if (value == null) return 0;     if (value instanceof number) return ((number) value).longvalue();     return long.parselong(value.tostring()); } 

if value null, 0 returned.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -