Skip to content

Commit a15fb92

Browse files
committedApr 21, 2014
Merge pull request android-async-http#528 from ldiqual/bugfix/default-cast-string
Cast params to string by default
2 parents a42deb5 + ea4c086 commit a15fb92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎library/src/main/java/com/loopj/android/http/RequestParams.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,8 @@ private List<BasicNameValuePair> getParamsList(String key, Object value) {
527527
for (Object nestedValue : set) {
528528
params.addAll(getParamsList(key, nestedValue));
529529
}
530-
} else if (value instanceof String) {
531-
params.add(new BasicNameValuePair(key, (String) value));
530+
} else {
531+
params.add(new BasicNameValuePair(key, value.toString()));
532532
}
533533
return params;
534534
}

0 commit comments

Comments
 (0)
Please sign in to comment.