Skip to content

Commit

Permalink
Fix Javadoc generation on Java 11 (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Apr 25, 2024
1 parent 84d6c32 commit 5946a06
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
24 changes: 14 additions & 10 deletions src/main/java/net/sf/json/JSONArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@
*/
public final class JSONArray extends AbstractJSON implements JSON, List<Object>, Comparable {
/**
* Creates a JSONArray.<br>
* Inspects the object type to call the correct JSONArray factory method.
* Creates a JSONArray.
*
* <p>Inspects the object type to call the correct JSONArray factory method.
* Accepts JSON formatted strings, arrays, Collections and Enums.
*
* @param object
Expand All @@ -104,8 +105,9 @@ public static JSONArray fromObject(Object object) {
}

/**
* Creates a JSONArray.<br>
* Inspects the object type to call the correct JSONArray factory method.
* Creates a JSONArray.
*
* <p>Inspects the object type to call the correct JSONArray factory method.
* Accepts JSON formatted strings, arrays, Collections and Enums.
*
* @param object
Expand Down Expand Up @@ -177,8 +179,9 @@ public static JSONArray fromObject(Object object, JsonConfig jsonConfig) {

/**
* Get the collection type from a getter or setter, or null if no type was
* found.<br/>
* Contributed by [Matt Small @ WaveMaker].
* found.
*
* <p>Contributed by [Matt Small @ WaveMaker].
*/
public static Class[] getCollectionType(PropertyDescriptor pd, boolean useGetter) throws JSONException {

Expand Down Expand Up @@ -367,14 +370,14 @@ public static Object toArray(JSONArray jsonArray, Object root, JsonConfig jsonCo
}

/**
* Returns a List or a Set taking generics into account.<br/>
* Returns a List or a Set taking generics into account.
*/
public static Collection toCollection(JSONArray jsonArray) {
return toCollection(jsonArray, new JsonConfig());
}

/**
* Returns a List or a Set taking generics into account.<br/>
* Returns a List or a Set taking generics into account.
*/
public static Collection toCollection(JSONArray jsonArray, Class objectClass) {
JsonConfig jsonConfig = new JsonConfig();
Expand All @@ -383,8 +386,9 @@ public static Collection toCollection(JSONArray jsonArray, Class objectClass) {
}

/**
* Returns a List or a Set taking generics into account.<br/>
* Contributed by [Matt Small @ WaveMaker].
* Returns a List or a Set taking generics into account.
*
* <p>Contributed by [Matt Small @ WaveMaker].
*/
public static Collection toCollection(JSONArray jsonArray, JsonConfig jsonConfig) {
Collection collection = null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/sf/json/JSONObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
* <code>{ } [ ] / \ : , = ; #</code> and if they do not look like numbers and
* if they are not the reserved words <code>true</code>, <code>false</code>,
* or <code>null</code>.</li>
* <li>Keys can be followed by <code>=</code> or <code>=></code> as well as
* <li>Keys can be followed by <code>=</code> or {@code =>} as well as
* by <code>:</code>.</li>
* <li>Values can be followed by <code>;</code> <small>(semicolon)</small>
* as well as by <code>,</code> <small>(comma)</small>.</li>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/net/sf/json/util/JavaIdentifierTransformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
* @author Andres Almiray <a href="mailto:[email protected]">[email protected]</a>
*/
public abstract class JavaIdentifierTransformer {
/** CamelCase transformer 'camel case' => 'camelCase' */
/** CamelCase transformer 'camel case' =gt; 'camelCase' */
public static final JavaIdentifierTransformer CAMEL_CASE = new CamelCaseJavaIdentifierTransformer();
/** Noop transformer '@invalid' => '@invalid' */
/** Noop transformer '@invalid' =&gt; '@invalid' */
public static final JavaIdentifierTransformer NOOP = new NoopJavaIdentifierTransformer();
/** Strict transformer '@invalid' => JSONException */
/** Strict transformer '@invalid' =&gt; JSONException */
public static final JavaIdentifierTransformer STRICT = new StrictJavaIdentifierTransformer();
/** Underscore transformer 'under score' => 'under_score' */
/** Underscore transformer 'under score' =&gt; 'under_score' */
public static final JavaIdentifierTransformer UNDERSCORE = new UnderscoreJavaIdentifierTransformer();
/** Whitespace transformer 'white space' => 'whitespace' */
/** Whitespace transformer 'white space' =&gt; 'whitespace' */
public static final JavaIdentifierTransformer WHITESPACE = new WhiteSpaceJavaIdentifierTransformer();

public abstract String transformToJavaIdentifier(String str);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/sf/json/util/PropertySetStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* Defines a custom setter to be used when setting object values.<br>
* Specify with JsonConfig.setJsonPropertySetter().
*
* @author Gino Miceli <a href="mailto:[email protected]">[email protected]></a>
* @author Gino Miceli <a href="mailto:[email protected]">[email protected]</a>
* @author Andres Almiray <a href="mailto:[email protected]">[email protected]</a>
*/
public abstract class PropertySetStrategy {
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/net/sf/json/util/WebUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public static void setWebHijackPreventionStrategy(WebHijackPreventionStrategy st
* Returns a string represenation of a JSON value.<br>
* When an object property name does not contain a space (' ') or a colon
* (':'), the quotes are omitted. This is done to reduce the amount of bytes
* sent to a web browser.<br/>USE WITH CAUTION.
* sent to a web browser.
*
* <p>USE WITH CAUTION.
*/
public static String toString(JSON json) {
if (json instanceof JSONObject) {
Expand Down

0 comments on commit 5946a06

Please sign in to comment.