Improve conversation list cold start performance.

This commit is contained in:
Clark
2023-02-28 11:39:30 -05:00
committed by Greyson Parrelli
parent 10e8c6d795
commit f3693c966a
7 changed files with 92 additions and 18 deletions

View File

@@ -11,6 +11,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import javax.annotation.Nullable;
public class JsonUtils {
private static final ObjectMapper objectMapper = new ObjectMapper();
@@ -54,7 +56,7 @@ public class JsonUtils {
this.delegate = delegate;
}
public String getString(String name) throws JSONException {
public @Nullable String getString(String name) throws JSONException {
if (delegate.isNull(name)) return null;
else return delegate.getString(name);
}
@@ -63,6 +65,10 @@ public class JsonUtils {
return delegate.getLong(name);
}
public boolean getBoolean(String name) throws JSONException {
return delegate.getBoolean(name);
}
public boolean isNull(String name) {
return delegate.isNull(name);
}