Skip to content

Commit 9e5f4e6

Browse files
committed
Code cleanup
1 parent c6746ab commit 9e5f4e6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

library/src/com/loopj/android/http/AsyncHttpClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ private HttpEntity paramsToEntity(RequestParams params, AsyncHttpResponseHandler
921921
}
922922
} catch (Throwable t) {
923923
if (responseHandler != null)
924-
responseHandler.sendFailureMessage(0, null, (byte[]) null, t);
924+
responseHandler.sendFailureMessage(0, null, null, t);
925925
else
926926
t.printStackTrace();
927927
}

library/src/com/loopj/android/http/AsyncHttpResponseHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {
225225
onSuccess(statusCode, headers, response);
226226
} catch (UnsupportedEncodingException e) {
227227
Log.e(LOG_TAG, e.toString());
228-
onFailure(statusCode, headers, e, (String) null);
228+
onFailure(statusCode, headers, e, null);
229229
}
230230
}
231231

@@ -290,7 +290,7 @@ public void onFailure(int statusCode, Header[] headers, Throwable error, String
290290
* @param error the underlying cause of the failure
291291
*/
292292
public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {
293-
String response = null;
293+
String response;
294294
try {
295295
response = new String(responseBody, getCharset());
296296
onFailure(statusCode, headers, error, response);

0 commit comments

Comments
 (0)