Francesco Romani has posted comments on this change. Change subject: core, engine: servlet to support the console proxy ......................................................................
Patch Set 33: (2 comments) thanks for the review Roy! https://gerrit.ovirt.org/#/c/35887/33/backend/manager/modules/services/src/main/java/org/ovirt/engine/core/services/VMConsoleProxyServlet.java File backend/manager/modules/services/src/main/java/org/ovirt/engine/core/services/VMConsoleProxyServlet.java: Line 110: // TODO: avoid one query per loop. Bulk query? > indeed pls create it. WIP in changes https://gerrit.ovirt.org/#/c/40698/ and https://gerrit.ovirt.org/#/c/40699/ They are "just" optimizations, so I delayed them to make sure the basic flow is working (it is pretty much working nowadays). Line 128: return jsonVms; Line 129: } Line 130: Line 131: private String readBody(BufferedReader body) throws IOException { Line 132: StringBuilder buffer = new StringBuilder(); > probably we should have a utility method somewhere for that, but anyhow, yo I already use the 'try-with-resources' construct (pointed out into a past review) in the calling site, in lines 197-215, to guard against the BufferedReader leak. Is that what you meant or should I guard also for the StringBuffer I use here in this method? Line 133: Line 134: int r; Line 135: while ((r = body.read()) != -1) { Line 136: buffer.append((char) r); -- To view, visit https://gerrit.ovirt.org/35887 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53c721da21cefcf4069d14c7016b6f7d97f9eac9 Gerrit-PatchSet: 33 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vitor de Lima <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Arik Hadas <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Ravi Nori <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: Shahar Havivi <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
