Add missing flush() on buffered writer. 10/64610/1
authorAndrej Záň <andrej.zan@pantheon.tech>
Mon, 23 Oct 2017 14:02:07 +0000 (16:02 +0200)
committerAndrej Záň <andrej.zan@pantheon.tech>
Mon, 23 Oct 2017 14:02:07 +0000 (16:02 +0200)
Missing flush caused, that backing ByteArrayOutputStream was empty
and thus mounted resources was not showing up in apidoc.

Change-Id: I14445b9f85cea1918321e59519129e21cb37dd81
Signed-off-by: Andrej Záň <andrej.zan@pantheon.tech>
restconf/sal-rest-docgen/src/main/java/org/opendaylight/netconf/sal/rest/doc/impl/ApiDocServiceImpl.java

index f5002e03714f36dce76c32778202972b3a2965b8..7db2161cc008d12421b6951566fe771277e5cef8 100644 (file)
@@ -97,6 +97,7 @@ public class ApiDocServiceImpl implements ApiDocService {
                 writer.writeEndObject();
             }
             writer.writeEndArray();
+            writer.flush();
         } catch (final Exception e) {
             return Response.status(500).entity(e.getMessage()).build();
         }