Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up comments #621

Merged
merged 1 commit into from Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/org/json/Cookie.java
Expand Up @@ -109,7 +109,7 @@ public static JSONObject toJSONObject(String string) {
// parse the remaining cookie attributes
while (x.more()) {
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)) {
throw new JSONException("Illegal attribute name: 'name'");
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/json/JSONArray.java
Expand Up @@ -385,7 +385,7 @@ public <E extends Enum<E>> E getEnum(Class<E> clazz, int index) throws JSONExcep

/**
* 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
* may arise.
*
Expand Down Expand Up @@ -792,7 +792,7 @@ public BigInteger optBigInteger(int index, BigInteger defaultValue) {
* Get the optional BigDecimal value associated with an index. 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
* 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
* issues that may arise.
*
Expand Down Expand Up @@ -1157,7 +1157,7 @@ public JSONArray put(int index, long value) throws JSONException {
* The Map value.
* @return this.
* @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.
* @throws NullPointerException
* If a key in the map is <code>null</code>
Expand All @@ -1180,7 +1180,7 @@ public JSONArray put(int index, Map<?, ?> value) throws JSONException {
* String, or the JSONObject.NULL object.
* @return this.
* @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.
*/
public JSONArray put(int index, Object value) throws JSONException {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/json/JSONObject.java
Expand Up @@ -645,7 +645,7 @@ public BigInteger getBigInteger(String key) throws JSONException {

/**
* 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
* arise.
*
Expand Down Expand Up @@ -1613,7 +1613,7 @@ private static String getKeyNameFromMethod(Method method) {
* @param annotationClass
* annotation to look for
* @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) {
// if we have invalid data the result is null
Expand Down Expand Up @@ -2236,7 +2236,7 @@ protected static Number stringToNumber(final String val) throws NumberFormatExce
// This will narrow any values to the smallest reasonable Object representation
// (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
// only what they need. i.e. Less runtime overhead if the value is
// long lived.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/json/XML.java
Expand Up @@ -532,7 +532,7 @@ private static Number stringToNumber(final String val) throws NumberFormatExcept
// This will narrow any values to the smallest reasonable Object representation
// (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
// only what they need. i.e. Less runtime overhead if the value is
// long lived.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/json/junit/EnumTest.java
Expand Up @@ -93,7 +93,7 @@ public void jsonObjectFromEnum() {

/**
* 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
public void jsonObjectFromEnumWithNames() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/json/junit/JSONObjectTest.java
Expand Up @@ -1678,7 +1678,7 @@ public void jsonObjectIncrement() {
// correct implementation (with change of behavior) would be:
// 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
// really in the the scope of a JSON-library (IMHO.)
// really in the scope of a JSON-library (IMHO.)

}

Expand Down