Add missing flush() on buffered writer. 89/65289/1
authorAndrej Záň <andrej.zan@pantheon.tech>
Mon, 23 Oct 2017 14:02:07 +0000 (16:02 +0200)
committerEvan Zeller <evanrzeller@gmail.com>
Tue, 7 Nov 2017 23:36:56 +0000 (23:36 +0000)
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>
(cherry picked from commit a2c0fda6b15dbf6717e2405bab868cda2fc209a3)

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();
         }