Skip to content

Commit 92038ce

Browse files
Merge pull request stleary#45 from guywithnose/master
Testing
2 parents fd0d115 + a264bae commit 92038ce

20 files changed

+8871
-935
lines changed

JSONML.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ private static Object parse(
163163
// attribute = value
164164

165165
attribute = (String)token;
166-
if (!arrayForm && (attribute == "tagName" || attribute == "childNode")) {
166+
if (!arrayForm && ("tagName".equals(attribute) || "childNode".equals(attribute))) {
167167
throw x.syntaxError("Reserved attribute.");
168168
}
169169
token = x.nextToken();
@@ -462,4 +462,4 @@ public static String toString(JSONObject jo) throws JSONException {
462462
}
463463
return sb.toString();
464464
}
465-
}
465+
}

JSONTokener.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public char skipTo(char to) throws JSONException {
403403
int startIndex = this.index;
404404
int startCharacter = this.character;
405405
int startLine = this.line;
406-
this.reader.mark(Integer.MAX_VALUE);
406+
this.reader.mark(1000000);
407407
do {
408408
c = this.next();
409409
if (c == 0) {
@@ -443,4 +443,4 @@ public String toString() {
443443
return " at " + this.index + " [character " + this.character + " line " +
444444
this.line + "]";
445445
}
446-
}
446+
}

Test.java

-931
This file was deleted.

tests/SampleResourceBundle_en_US.java

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* File: SampleResourceBundle_en_US.java
3+
* Author: JSON.org
4+
*/
5+
package org.json.tests;
6+
7+
import java.util.*;
8+
9+
/**
10+
* The Class SampleResourceBundle_en_US.
11+
*/
12+
public class SampleResourceBundle_en_US extends ListResourceBundle {
13+
14+
/* (non-Javadoc)
15+
* @see java.util.ListResourceBundle#getContents()
16+
*/
17+
@Override
18+
public Object[][] getContents() {
19+
return contents;
20+
}
21+
22+
/** The contents. */
23+
private Object[][] contents = {
24+
{ "ASCII", "American Standard Code for Information Interchange" },
25+
{ "JAVA.desc", "Just Another Vague Acronym" },
26+
{ "JAVA.data", "Sweet language" },
27+
{ "JSON", "JavaScript Object Notation" },
28+
};
29+
}

tests/SampleResourceBundle_fr.java

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* File: SampleResourceBundle_fr.java
3+
* Author: JSON.org
4+
*/
5+
package org.json.tests;
6+
7+
import java.util.*;
8+
9+
/**
10+
* The Class SampleResourceBundle_fr.
11+
*/
12+
public class SampleResourceBundle_fr extends ListResourceBundle {
13+
14+
/* (non-Javadoc)
15+
* @see java.util.ListResourceBundle#getContents()
16+
*/
17+
@Override
18+
public Object[][] getContents() {
19+
return contents;
20+
}
21+
22+
/** The contents. */
23+
private Object[][] contents = {
24+
{ "ASCII", "Number that represent chraracters" },
25+
{ "JAVA", "The language you are running to see this" },
26+
{ "JSON", "What are we testing?" },
27+
};
28+
}

0 commit comments

Comments
 (0)