avoid `NullPointerException`
This commit is contained in:
parent
221e45cd52
commit
8d0caf65a2
|
@ -132,7 +132,7 @@ public class DocumentPropertiesLoader extends AsyncTaskLoader<List<CharSequence>
|
||||||
final SpannableStringBuilder property = new SpannableStringBuilder(name).append(":\n");
|
final SpannableStringBuilder property = new SpannableStringBuilder(name).append(":\n");
|
||||||
final String value = json != null ? json.optString(specName, "-") : specName;
|
final String value = json != null ? json.optString(specName, "-") : specName;
|
||||||
|
|
||||||
if (specName.endsWith("Date")) {
|
if (specName != null && specName.endsWith("Date")) {
|
||||||
final Context context = getContext();
|
final Context context = getContext();
|
||||||
try {
|
try {
|
||||||
property.append(value.equals("-") ? value : Utils.parseDate(value));
|
property.append(value.equals("-") ? value : Utils.parseDate(value));
|
||||||
|
|
Loading…
Reference in New Issue