avoid NullPointerException

This commit is contained in:
Pratyush 2022-10-02 19:40:55 +05:30 committed by Daniel Micay
parent 221e45cd52
commit 8d0caf65a2

View File

@ -132,7 +132,7 @@ public class DocumentPropertiesLoader extends AsyncTaskLoader<List<CharSequence>
final SpannableStringBuilder property = new SpannableStringBuilder(name).append(":\n");
final String value = json != null ? json.optString(specName, "-") : specName;
if (specName.endsWith("Date")) {
if (specName != null && specName.endsWith("Date")) {
final Context context = getContext();
try {
property.append(value.equals("-") ? value : Utils.parseDate(value));