Skip to content

Commit

Permalink
Add log line that could help us in case of errors in the JSON parsing…
Browse files Browse the repository at this point in the history
… with queryJSON.
  • Loading branch information
daniloercoli committed Nov 12, 2015
1 parent 7506241 commit d84f13a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public static <U> U queryJSON(JSONObject source, String query, U defaultObject)
if (result.getClass().isAssignableFrom(defaultObject.getClass())) {
return (U) result;
} else {
AppLog.w(T.UTILS, String.format("The returned object type %s is not assignable to the type %s. Using default!",
result.getClass(),defaultObject.getClass()));
return defaultObject;
}
} catch (java.lang.ClassCastException e) {
Expand Down

0 comments on commit d84f13a

Please sign in to comment.