Skip to content

Commit de5f768

Browse files
authored
Merge pull request stleary#621 from cushon/typos
Fix some typos
2 parents fb71d9d + 8ca8a80 commit de5f768

6 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/main/java/org/json/Cookie.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static JSONObject toJSONObject(String string) {
109109
// parse the remaining cookie attributes
110110
while (x.more()) {
111111
name = unescape(x.nextTo("=;")).trim().toLowerCase(Locale.ROOT);
112-
// don't allow a cookies attributes to overwrite it's name or value.
112+
// don't allow a cookies attributes to overwrite its name or value.
113113
if("name".equalsIgnoreCase(name)) {
114114
throw new JSONException("Illegal attribute name: 'name'");
115115
}

src/main/java/org/json/JSONArray.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public <E extends Enum<E>> E getEnum(Class<E> clazz, int index) throws JSONExcep
385385

386386
/**
387387
* Get the BigDecimal value associated with an index. If the value is float
388-
* or double, the the {@link BigDecimal#BigDecimal(double)} constructor
388+
* or double, the {@link BigDecimal#BigDecimal(double)} constructor
389389
* will be used. See notes on the constructor for conversion issues that
390390
* may arise.
391391
*
@@ -792,7 +792,7 @@ public BigInteger optBigInteger(int index, BigInteger defaultValue) {
792792
* Get the optional BigDecimal value associated with an index. The
793793
* defaultValue is returned if there is no value for the index, or if the
794794
* value is not a number and cannot be converted to a number. If the value
795-
* is float or double, the the {@link BigDecimal#BigDecimal(double)}
795+
* is float or double, the {@link BigDecimal#BigDecimal(double)}
796796
* constructor will be used. See notes on the constructor for conversion
797797
* issues that may arise.
798798
*
@@ -1157,7 +1157,7 @@ public JSONArray put(int index, long value) throws JSONException {
11571157
* The Map value.
11581158
* @return this.
11591159
* @throws JSONException
1160-
* If the index is negative or if the the value is an invalid
1160+
* If the index is negative or if the value is an invalid
11611161
* number.
11621162
* @throws NullPointerException
11631163
* If a key in the map is <code>null</code>
@@ -1180,7 +1180,7 @@ public JSONArray put(int index, Map<?, ?> value) throws JSONException {
11801180
* String, or the JSONObject.NULL object.
11811181
* @return this.
11821182
* @throws JSONException
1183-
* If the index is negative or if the the value is an invalid
1183+
* If the index is negative or if the value is an invalid
11841184
* number.
11851185
*/
11861186
public JSONArray put(int index, Object value) throws JSONException {

src/main/java/org/json/JSONObject.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ public BigInteger getBigInteger(String key) throws JSONException {
645645

646646
/**
647647
* Get the BigDecimal value associated with a key. If the value is float or
648-
* double, the the {@link BigDecimal#BigDecimal(double)} constructor will
648+
* double, the {@link BigDecimal#BigDecimal(double)} constructor will
649649
* be used. See notes on the constructor for conversion issues that may
650650
* arise.
651651
*
@@ -1613,7 +1613,7 @@ private static String getKeyNameFromMethod(Method method) {
16131613
* @param annotationClass
16141614
* annotation to look for
16151615
* @return the {@link Annotation} if the annotation exists on the current method
1616-
* or one of it's super class definitions
1616+
* or one of its super class definitions
16171617
*/
16181618
private static <A extends Annotation> A getAnnotation(final Method m, final Class<A> annotationClass) {
16191619
// if we have invalid data the result is null
@@ -2236,7 +2236,7 @@ protected static Number stringToNumber(final String val) throws NumberFormatExce
22362236
// This will narrow any values to the smallest reasonable Object representation
22372237
// (Integer, Long, or BigInteger)
22382238

2239-
// BigInteger down conversion: We use a similar bitLenth compare as
2239+
// BigInteger down conversion: We use a similar bitLength compare as
22402240
// BigInteger#intValueExact uses. Increases GC, but objects hold
22412241
// only what they need. i.e. Less runtime overhead if the value is
22422242
// long lived.

src/main/java/org/json/XML.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ private static Number stringToNumber(final String val) throws NumberFormatExcept
532532
// This will narrow any values to the smallest reasonable Object representation
533533
// (Integer, Long, or BigInteger)
534534

535-
// BigInteger down conversion: We use a similar bitLenth compare as
535+
// BigInteger down conversion: We use a similar bitLength compare as
536536
// BigInteger#intValueExact uses. Increases GC, but objects hold
537537
// only what they need. i.e. Less runtime overhead if the value is
538538
// long lived.

src/test/java/org/json/junit/EnumTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void jsonObjectFromEnum() {
9393

9494
/**
9595
* To serialize an enum by its set of allowed values, use getNames()
96-
* and the the JSONObject Object with names constructor.
96+
* and the JSONObject Object with names constructor.
9797
*/
9898
@Test
9999
public void jsonObjectFromEnumWithNames() {

src/test/java/org/json/junit/JSONObjectTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,7 @@ public void jsonObjectIncrement() {
16781678
// correct implementation (with change of behavior) would be:
16791679
// this.put(key, new Float((Float) value + 1));
16801680
// Probably it would be better to deprecate the method and remove some day, while convenient processing the "payload" is not
1681-
// really in the the scope of a JSON-library (IMHO.)
1681+
// really in the scope of a JSON-library (IMHO.)
16821682

16831683
}
16841684

0 commit comments

Comments
 (0)