Skip to content

Commit

Permalink
deserialize method call is non static
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffGos committed Aug 6, 2014
1 parent 1116f68 commit 397bfcb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified out/artifacts/androiddevkit_jar/androiddevkit-1.0.0.jar
Binary file not shown.
8 changes: 4 additions & 4 deletions src/com/jaigo/androiddevkit/WebServiceRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected void onComplete(Object result)
Method deserialize = responseClass.getMethod("deserialize", InputStream.class);

@SuppressWarnings("unchecked")
T responseDTO = (T) deserialize.invoke(null, is);
T responseDTO = (T) deserialize.invoke(result, is);

if (requestHandler != null)
{
Expand Down Expand Up @@ -71,10 +71,10 @@ protected void onError(Throwable error)

try
{
Method createError = responseClass.getMethod("createErrorResponse", String.class, String.class, String.class);
Method createErrorResponse = responseClass.getMethod("createErrorResponse", String.class, String.class, String.class);

@SuppressWarnings("unchecked")
T responseDTO = (T) createError.invoke(null, "UnknownError", error.getMessage(), Log.getStackTraceString(error));
T responseDTO = (T) createErrorResponse.invoke(null, "UnknownError", error.getMessage(), Log.getStackTraceString(error));

if (requestHandler != null)
{
Expand All @@ -83,7 +83,7 @@ protected void onError(Throwable error)
}
catch (Exception e)
{
onError(e);
Log.e(LOG_TAG, "onError: " + requestUrl, e);
}
}
}

0 comments on commit 397bfcb

Please sign in to comment.