mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-02-06 05:53:25 +01:00
bug fix, suppressed warnings
This commit is contained in:
parent
688aaf066d
commit
ab9d2b747f
@ -1160,6 +1160,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
|
||||
Directmessages result = new Directmessages(cursor, nextCursor);
|
||||
for (int pos = 0; pos < array.length(); pos++) {
|
||||
JSONObject item = array.getJSONObject(pos);
|
||||
try {
|
||||
DirectmessageV1 message = new DirectmessageV1(item);
|
||||
long senderId = message.getSenderId();
|
||||
long receiverId = message.getReceiverId();
|
||||
@ -1179,6 +1180,9 @@ public class Twitter implements GlobalSettings.SettingsListener {
|
||||
message.addReceiver(user);
|
||||
}
|
||||
result.add(message);
|
||||
} catch (JSONException e) {
|
||||
Log.w("directmessage", e);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -1687,6 +1691,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
|
||||
* @param params additional http parameters
|
||||
* @return http resonse
|
||||
*/
|
||||
@SuppressWarnings("SameParameterValue")
|
||||
private Response post(String endpoint, List<String> params, JSONObject json) throws IOException {
|
||||
RequestBody body = RequestBody.create(TYPE_JSON, json.toString());
|
||||
return post(endpoint, params, body);
|
||||
@ -1767,6 +1772,7 @@ public class Twitter implements GlobalSettings.SettingsListener {
|
||||
* @param endpoint endpoint url
|
||||
* @return http response
|
||||
*/
|
||||
@SuppressWarnings("SameParameterValue")
|
||||
private Response delete(String endpoint, List<String> params) throws IOException {
|
||||
String authHeader = buildHeader("DELETE", endpoint, params);
|
||||
String url = appendParams(endpoint, params);
|
||||
|
Loading…
x
Reference in New Issue
Block a user