mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 03:15:32 -04:00
refactor: rename variable boolean 'b' to 'isEndOfPair' in CookieList.toString()
This commit is contained in:
parent
5c4a7a1b1f
commit
097a401f3f
@ -46,19 +46,19 @@ public class CookieList {
|
|||||||
* @throws JSONException if a called function fails
|
* @throws JSONException if a called function fails
|
||||||
*/
|
*/
|
||||||
public static String toString(JSONObject jo) throws JSONException {
|
public static String toString(JSONObject jo) throws JSONException {
|
||||||
boolean b = false;
|
boolean isEndOfPair = false;
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
// Don't use the new entrySet API to maintain Android support
|
// Don't use the new entrySet API to maintain Android support
|
||||||
for (final String key : jo.keySet()) {
|
for (final String key : jo.keySet()) {
|
||||||
final Object value = jo.opt(key);
|
final Object value = jo.opt(key);
|
||||||
if (!JSONObject.NULL.equals(value)) {
|
if (!JSONObject.NULL.equals(value)) {
|
||||||
if (b) {
|
if (isEndOfPair) {
|
||||||
sb.append(';');
|
sb.append(';');
|
||||||
}
|
}
|
||||||
sb.append(Cookie.escape(key));
|
sb.append(Cookie.escape(key));
|
||||||
sb.append("=");
|
sb.append("=");
|
||||||
sb.append(Cookie.escape(value.toString()));
|
sb.append(Cookie.escape(value.toString()));
|
||||||
b = true;
|
isEndOfPair = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user