Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static LiveObjectSerializer getLiveObjectSerializer() {
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException |
NoSuchMethodException |
InvocationTargetException e) {
Log.e(TAG, "Failed to init LiveObjectSerializer, LiveObjects plugin not included in the classpath", e);
Log.w(TAG, "Failed to init LiveObjectSerializer, LiveObjects plugin not included in the classpath", e);
return null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

public class LiveObjectsJsonSerializer implements JsonSerializer<Object[]>, JsonDeserializer<Object[]> {
private static final String TAG = LiveObjectsJsonSerializer.class.getName();
private final LiveObjectSerializer serializer = LiveObjectsHelper.getLiveObjectSerializer();

@Override
public Object[] deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
LiveObjectSerializer serializer = LiveObjectsHelper.getLiveObjectSerializer();
if (serializer == null) {
Log.w(TAG, "Skipping 'state' field json deserialization because LiveObjectsSerializer not found.");
return null;
Expand All @@ -29,6 +29,7 @@ public Object[] deserialize(JsonElement json, Type typeOfT, JsonDeserializationC

@Override
public JsonElement serialize(Object[] src, Type typeOfSrc, JsonSerializationContext context) {
LiveObjectSerializer serializer = LiveObjectsHelper.getLiveObjectSerializer();
if (serializer == null) {
Log.w(TAG, "Skipping 'state' field json serialization because LiveObjectsSerializer not found.");
return JsonNull.INSTANCE;
Expand Down
Loading