Skip to content

Commit 6878b3f

Browse files
author
zb939r
committed
Minor update to Generics
1 parent 320113b commit 6878b3f

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

JSONArray.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public JSONArray(Object array) throws JSONException {
179179
}
180180

181181
@Override
182-
public Iterator iterator() {
182+
public Iterator<Object> iterator() {
183183
return myArrayList.iterator();
184184
}
185185

JSONException.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
*/
88
public class JSONException extends Exception {
99

10-
/**
10+
private static final long serialVersionUID = 1L;
11+
12+
/**
1113
* Constructs a JSONException with an explanatory message.
1214
* @param message Detail about the reason for the exception.
1315
*/

JSONObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public JSONObject(JSONTokener x) throws JSONException {
238238
* the JSONObject.
239239
* @throws JSONException
240240
*/
241-
public JSONObject(Map map) {
241+
public JSONObject(Map<String, Object> map) {
242242
this.map = new HashMap<String, Object>();
243243
if (map != null) {
244244
for( Map.Entry<String, Object> e : this.map.entrySet() ) {

XMLTokener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class XMLTokener extends JSONTokener {
3939
/** The table of entity values. It initially contains Character values for
4040
* amp, apos, gt, lt, quot.
4141
*/
42-
public static final Map entity;
42+
public static final Map<String, Object> entity;
4343

4444
static {
4545
entity = new TreeMap<String, Object>();

0 commit comments

Comments
 (0)