diff --git a/README.md b/README.md
index 1db1f54..9806f2a 100644
--- a/README.md
+++ b/README.md
@@ -66,7 +66,7 @@ import org.json.JSONObject;
public class Test {
public static void main(String args[]){
JSONObject jo = new JSONObject("{ \"abc\" : \"def\" }");
- System.out.println(jo.toString());
+ System.out.println(jo);
}
}
```
diff --git a/gradlew b/gradlew
old mode 100644
new mode 100755
diff --git a/pom.xml b/pom.xml
index 927a989..d01283c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -104,6 +104,9 @@
1.8
1.8
+
+ -Xlint:unchecked
+
diff --git a/src/main/java/org/json/CookieList.java b/src/main/java/org/json/CookieList.java
index 8ad8b58..03e54b9 100644
--- a/src/main/java/org/json/CookieList.java
+++ b/src/main/java/org/json/CookieList.java
@@ -46,19 +46,19 @@ public class CookieList {
* @throws JSONException if a called function fails
*/
public static String toString(JSONObject jo) throws JSONException {
- boolean b = false;
+ boolean isEndOfPair = false;
final StringBuilder sb = new StringBuilder();
// Don't use the new entrySet API to maintain Android support
for (final String key : jo.keySet()) {
final Object value = jo.opt(key);
if (!JSONObject.NULL.equals(value)) {
- if (b) {
+ if (isEndOfPair) {
sb.append(';');
}
sb.append(Cookie.escape(key));
sb.append("=");
sb.append(Cookie.escape(value.toString()));
- b = true;
+ isEndOfPair = true;
}
}
return sb.toString();
diff --git a/src/main/java/org/json/JSONArray.java b/src/main/java/org/json/JSONArray.java
index ed7982f..38b0b31 100644
--- a/src/main/java/org/json/JSONArray.java
+++ b/src/main/java/org/json/JSONArray.java
@@ -149,11 +149,40 @@ public class JSONArray implements Iterable