This is an automated email from the ASF dual-hosted git repository. andy pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/jena.git
commit a378e42dbb1503c1425ff5eb135d6e23f0d5cc13 Author: Andy Seaborne <[email protected]> AuthorDate: Sun Nov 3 14:45:11 2024 +0000 Bug fix: when there no args in IRIValidatorJSON --- .../org/apache/jena/fuseki/validation/json/IRIValidatorJSON.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/json/IRIValidatorJSON.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/json/IRIValidatorJSON.java index 8b7fa1ee79..0ec322e75a 100644 --- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/json/IRIValidatorJSON.java +++ b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/validation/json/IRIValidatorJSON.java @@ -38,7 +38,7 @@ public class IRIValidatorJSON { static final String paramIRI = "iri"; // Output is an object { "iris" : [ ] } - // { "iri": "" , "error": [], "warnings": [] } + // with array entries { "iri": "" , "error": [], "warnings": [] } static final String jIRIs = "iris"; static final String jIRI = "iri"; @@ -47,8 +47,10 @@ public class IRIValidatorJSON { obj.startObject(); String args[] = getArgs(action, paramIRI); - if ( args.length == 0 ) + if ( args == null || args.length == 0 ) { ServletOps.errorBadRequest("No IRIs supplied"); + return null; + } obj.key(jIRIs); obj.startArray();
