This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-post.git


The following commit(s) were added to refs/heads/master by this push:
     new c719cfb  Resolving SLING-7648 by checking to make sure that the 
arguments are not null when generating the JSON response
c719cfb is described below

commit c719cfb122e9d2bcd54e16e0d95b3f5e278dee9a
Author: Dan Klco <[email protected]>
AuthorDate: Thu May 3 13:15:38 2018 -0400

    Resolving SLING-7648 by checking to make sure that the arguments are not 
null when generating the JSON response
---
 src/main/java/org/apache/sling/servlets/post/JSONResponse.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/servlets/post/JSONResponse.java 
b/src/main/java/org/apache/sling/servlets/post/JSONResponse.java
index 362bf56..b4e7e45 100644
--- a/src/main/java/org/apache/sling/servlets/post/JSONResponse.java
+++ b/src/main/java/org/apache/sling/servlets/post/JSONResponse.java
@@ -190,7 +190,9 @@ public class JSONResponse extends AbstractPostResponse {
                         JsonArrayBuilder argumentsBuilder = 
Json.createArrayBuilder();
 
                         for (String argument : ((List<String>) arguments)) {
-                            argumentsBuilder.add(argument);
+                               if(argument != null) {
+                                argumentsBuilder.add(argument);
+                               }
                         }
 
                         entryBuilder.add(PROP_ARGUMENT, argumentsBuilder);

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to