apps-android-commons/app
Jason-Whitmore 0a4b179db5
Fixes Issue 6436: getString(...) must not be null (#6474)
* DatabaseUtils.kt: change getString() to allow null returns

Before this change, a call to getString() would assume that the specified column
name actually exists. A bad String input would cause a null value to be returned
to getString(), which would then throw a NPE because getString() can only return
non null Strings.

This change expands the getString() method to check if the column name exists.
If it does exist, the String is retrieved normally. Else, a null value is
returned. The method signature is changed to allow null return values.

* *Dao.kt: change some usages of getString()

Before this change, the getString() method in DatabaseUtils.kt was changed
to allow returning a null value upon method failure. All usages of getString()
were not changed.

This change updates all usages of getString() which require non null return
values. If null is returned, an empty string is used instead.

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2025-10-11 14:12:19 +09:00
..
src Fixes Issue 6436: getString(...) must not be null (#6474) 2025-10-11 14:12:19 +09:00
build.gradle.kts chore: upgrade native libraries for 16KB page size compatibility (#6445) 2025-10-08 23:25:20 +09:00
proguard-rules.txt Fix/file usage not working (#6354) 2025-06-24 21:56:00 +09:00
test-proguard-rules.txt Update to API 28, and fix CI issues. (#2595) 2019-03-15 08:30:08 +05:30