sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject svn commit: r1797245 - /sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JsonRenderer.java
Date Thu, 01 Jun 2017 19:23:16 GMT
Author: pauls
Date: Thu Jun  1 19:23:16 2017
New Revision: 1797245

URL: http://svn.apache.org/viewvc?rev=1797245&view=rev
Log:
SLING-6927: Fix the JsonRenderer by forcing a flush at the end of a render.

Modified:
    sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JsonRenderer.java

Modified: sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JsonRenderer.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JsonRenderer.java?rev=1797245&r1=1797244&r2=1797245&view=diff
==============================================================================
--- sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JsonRenderer.java
(original)
+++ sling/trunk/testing/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JsonRenderer.java
Thu Jun  1 19:23:16 2017
@@ -22,11 +22,7 @@ import java.util.Collection;
 import java.util.Map;
 
 import javax.json.Json;
-import javax.json.JsonArrayBuilder;
-import javax.json.JsonBuilderFactory;
 import javax.json.JsonException;
-import javax.json.JsonValue;
-import javax.json.JsonWriter;
 import javax.json.stream.JsonGenerator;
 import javax.servlet.http.HttpServletResponse;
 
@@ -85,6 +81,7 @@ public class JsonRenderer extends RunLis
         if(writer != null) {
             try {
                 writer.writeEnd();
+                writer.flush();
             } catch(JsonException jex) {
                 log.warn("JsonException in cleanup()", jex);
             }



Mime
View raw message