Fix some typos

This commit is contained in:
Liam Miller-Cushon 2021-08-25 13:56:44 -07:00
parent fb71d9d40f
commit 8ca8a80753
6 changed files with 11 additions and 11 deletions

View File

@ -109,7 +109,7 @@ public class Cookie {
// parse the remaining cookie attributes // parse the remaining cookie attributes
while (x.more()) { while (x.more()) {
name = unescape(x.nextTo("=;")).trim().toLowerCase(Locale.ROOT); name = unescape(x.nextTo("=;")).trim().toLowerCase(Locale.ROOT);
// don't allow a cookies attributes to overwrite it's name or value. // don't allow a cookies attributes to overwrite its name or value.
if("name".equalsIgnoreCase(name)) { if("name".equalsIgnoreCase(name)) {
throw new JSONException("Illegal attribute name: 'name'"); throw new JSONException("Illegal attribute name: 'name'");
} }

View File

@ -385,7 +385,7 @@ public class JSONArray implements Iterable<Object> {
/** /**
* Get the BigDecimal value associated with an index. If the value is float * Get the BigDecimal value associated with an index. If the value is float
* or double, the the {@link BigDecimal#BigDecimal(double)} constructor * or double, the {@link BigDecimal#BigDecimal(double)} constructor
* will be used. See notes on the constructor for conversion issues that * will be used. See notes on the constructor for conversion issues that
* may arise. * may arise.
* *
@ -792,7 +792,7 @@ public class JSONArray implements Iterable<Object> {
* Get the optional BigDecimal value associated with an index. The * Get the optional BigDecimal value associated with an index. The
* defaultValue is returned if there is no value for the index, or if the * defaultValue is returned if there is no value for the index, or if the
* value is not a number and cannot be converted to a number. If the value * value is not a number and cannot be converted to a number. If the value
* is float or double, the the {@link BigDecimal#BigDecimal(double)} * is float or double, the {@link BigDecimal#BigDecimal(double)}
* constructor will be used. See notes on the constructor for conversion * constructor will be used. See notes on the constructor for conversion
* issues that may arise. * issues that may arise.
* *
@ -1157,7 +1157,7 @@ public class JSONArray implements Iterable<Object> {
* The Map value. * The Map value.
* @return this. * @return this.
* @throws JSONException * @throws JSONException
* If the index is negative or if the the value is an invalid * If the index is negative or if the value is an invalid
* number. * number.
* @throws NullPointerException * @throws NullPointerException
* If a key in the map is <code>null</code> * If a key in the map is <code>null</code>
@ -1180,7 +1180,7 @@ public class JSONArray implements Iterable<Object> {
* String, or the JSONObject.NULL object. * String, or the JSONObject.NULL object.
* @return this. * @return this.
* @throws JSONException * @throws JSONException
* If the index is negative or if the the value is an invalid * If the index is negative or if the value is an invalid
* number. * number.
*/ */
public JSONArray put(int index, Object value) throws JSONException { public JSONArray put(int index, Object value) throws JSONException {

View File

@ -645,7 +645,7 @@ public class JSONObject {
/** /**
* Get the BigDecimal value associated with a key. If the value is float or * Get the BigDecimal value associated with a key. If the value is float or
* double, the the {@link BigDecimal#BigDecimal(double)} constructor will * double, the {@link BigDecimal#BigDecimal(double)} constructor will
* be used. See notes on the constructor for conversion issues that may * be used. See notes on the constructor for conversion issues that may
* arise. * arise.
* *
@ -1613,7 +1613,7 @@ public class JSONObject {
* @param annotationClass * @param annotationClass
* annotation to look for * annotation to look for
* @return the {@link Annotation} if the annotation exists on the current method * @return the {@link Annotation} if the annotation exists on the current method
* or one of it's super class definitions * or one of its super class definitions
*/ */
private static <A extends Annotation> A getAnnotation(final Method m, final Class<A> annotationClass) { private static <A extends Annotation> A getAnnotation(final Method m, final Class<A> annotationClass) {
// if we have invalid data the result is null // if we have invalid data the result is null
@ -2236,7 +2236,7 @@ public class JSONObject {
// This will narrow any values to the smallest reasonable Object representation // This will narrow any values to the smallest reasonable Object representation
// (Integer, Long, or BigInteger) // (Integer, Long, or BigInteger)
// BigInteger down conversion: We use a similar bitLenth compare as // BigInteger down conversion: We use a similar bitLength compare as
// BigInteger#intValueExact uses. Increases GC, but objects hold // BigInteger#intValueExact uses. Increases GC, but objects hold
// only what they need. i.e. Less runtime overhead if the value is // only what they need. i.e. Less runtime overhead if the value is
// long lived. // long lived.

View File

@ -532,7 +532,7 @@ public class XML {
// This will narrow any values to the smallest reasonable Object representation // This will narrow any values to the smallest reasonable Object representation
// (Integer, Long, or BigInteger) // (Integer, Long, or BigInteger)
// BigInteger down conversion: We use a similar bitLenth compare as // BigInteger down conversion: We use a similar bitLength compare as
// BigInteger#intValueExact uses. Increases GC, but objects hold // BigInteger#intValueExact uses. Increases GC, but objects hold
// only what they need. i.e. Less runtime overhead if the value is // only what they need. i.e. Less runtime overhead if the value is
// long lived. // long lived.

View File

@ -93,7 +93,7 @@ public class EnumTest {
/** /**
* To serialize an enum by its set of allowed values, use getNames() * To serialize an enum by its set of allowed values, use getNames()
* and the the JSONObject Object with names constructor. * and the JSONObject Object with names constructor.
*/ */
@Test @Test
public void jsonObjectFromEnumWithNames() { public void jsonObjectFromEnumWithNames() {

View File

@ -1678,7 +1678,7 @@ public class JSONObjectTest {
// correct implementation (with change of behavior) would be: // correct implementation (with change of behavior) would be:
// this.put(key, new Float((Float) value + 1)); // this.put(key, new Float((Float) value + 1));
// Probably it would be better to deprecate the method and remove some day, while convenient processing the "payload" is not // Probably it would be better to deprecate the method and remove some day, while convenient processing the "payload" is not
// really in the the scope of a JSON-library (IMHO.) // really in the scope of a JSON-library (IMHO.)
} }