@@ -20,12 +20,12 @@ public class ParserConfiguration {
2020
2121 /**
2222 * Specifies if values should be kept as strings (<code>true</code>), or if
23- * they should try to be guessed into JSON values (numeric, boolean, string)
23+ * they should try to be guessed into JSON values (numeric, boolean, string).
2424 */
2525 protected boolean keepStrings ;
2626
2727 /**
28- * The maximum nesting depth when parsing a document .
28+ * The maximum nesting depth when parsing an object .
2929 */
3030 protected int maxNestingDepth ;
3131
@@ -59,14 +59,14 @@ protected ParserConfiguration clone() {
5959 // map should be cloned as well. If the values of the map are known to also
6060 // be immutable, then a shallow clone of the map is acceptable.
6161 return new ParserConfiguration (
62- this .keepStrings ,
63- this .maxNestingDepth
62+ this .keepStrings ,
63+ this .maxNestingDepth
6464 );
6565 }
6666
6767 /**
6868 * When parsing the XML into JSONML, specifies if values should be kept as strings (<code>true</code>), or if
69- * they should try to be guessed into JSON values (numeric, boolean, string)
69+ * they should try to be guessed into JSON values (numeric, boolean, string).
7070 *
7171 * @return The <code>keepStrings</code> configuration value.
7272 */
@@ -78,22 +78,21 @@ public boolean isKeepStrings() {
7878 * When parsing the XML into JSONML, specifies if values should be kept as strings (<code>true</code>), or if
7979 * they should try to be guessed into JSON values (numeric, boolean, string)
8080 *
81- * @param newVal
82- * new value to use for the <code>keepStrings</code> configuration option.
83- * @param <T> the type of the configuration object
84- *
81+ * @param newVal new value to use for the <code>keepStrings</code> configuration option.
82+ * @param <T> the type of the configuration object
8583 * @return The existing configuration will not be modified. A new configuration is returned.
8684 */
8785 @ SuppressWarnings ("unchecked" )
8886 public <T extends ParserConfiguration > T withKeepStrings (final boolean newVal ) {
89- T newConfig = (T )this .clone ();
87+ T newConfig = (T ) this .clone ();
9088 newConfig .keepStrings = newVal ;
9189 return newConfig ;
9290 }
9391
9492 /**
9593 * The maximum nesting depth that the parser will descend before throwing an exception
96- * when parsing the XML into JSONML.
94+ * when parsing an object (e.g. Map, Collection) into JSON-related objects.
95+ *
9796 * @return the maximum nesting depth set for this configuration
9897 */
9998 public int getMaxNestingDepth () {
@@ -102,18 +101,19 @@ public int getMaxNestingDepth() {
102101
103102 /**
104103 * Defines the maximum nesting depth that the parser will descend before throwing an exception
105- * when parsing the XML into JSONML. The default max nesting depth is 512, which means the parser
106- * will throw a JsonException if the maximum depth is reached.
104+ * when parsing an object (e.g. Map, Collection) into JSON-related objects.
105+ * The default max nesting depth is 512, which means the parser will throw a JsonException if
106+ * the maximum depth is reached.
107107 * Using any negative value as a parameter is equivalent to setting no limit to the nesting depth,
108108 * which means the parses will go as deep as the maximum call stack size allows.
109+ *
109110 * @param maxNestingDepth the maximum nesting depth allowed to the XML parser
110- * @param <T> the type of the configuration object
111- *
111+ * @param <T> the type of the configuration object
112112 * @return The existing configuration will not be modified. A new configuration is returned.
113113 */
114114 @ SuppressWarnings ("unchecked" )
115115 public <T extends ParserConfiguration > T withMaxNestingDepth (int maxNestingDepth ) {
116- T newConfig = (T )this .clone ();
116+ T newConfig = (T ) this .clone ();
117117
118118 if (maxNestingDepth > UNDEFINED_MAXIMUM_NESTING_DEPTH ) {
119119 newConfig .maxNestingDepth = maxNestingDepth ;
0 commit comments