Skip to content

Commit

Permalink
Add missing space in @Description, inline JSONObject (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Sep 22, 2022
1 parent 4a4d537 commit 43989af
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*/
@Description("Validate JSON against a given schema, send only valid input to the receiver. Pass the schema location to validate against. " +
"Set `schemaRoot` for resolving sub-schemas referenced in `$id` or `$ref` (defaults to the classpath root: `/`). " +
"Write valid and/or invalid output to locations specified with `writeValid` and `writeInvalid`." +
"Write valid and/or invalid output to locations specified with `writeValid` and `writeInvalid`. " +
"Set the JSON key for the record ID value with `idKey` (for logging output, defaults to `id`).")
@In(String.class)
@Out(String.class)
Expand Down Expand Up @@ -101,10 +101,8 @@ public void setIdKey(final String idKey) {

@Override
public void process(final String json) {
final JSONObject object;
try {
object = new JSONObject(json); // throws JSONException on syntax error
validate(json, object);
validate(json, new JSONObject(json) /* throws JSONException on syntax error */);
}
catch (final JSONException e) {
handleInvalid(json, null, e.getMessage());
Expand Down

0 comments on commit 43989af

Please sign in to comment.