Liron Aravot has posted comments on this change. Change subject: core: Adding support for TarInMemoryExport ......................................................................
Patch Set 8: Code-Review+1 (2 comments) minor comments, looks good! http://gerrit.ovirt.org/#/c/29039/8/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/archivers/tar/TarInMemoryExport.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/archivers/tar/TarInMemoryExport.java: Line 37: byte[] content = new byte[(int) tarEntry.getSize()]; Line 38: Line 39: // Read file from the archive into byte array. Line 40: try (InputStream is = new FileInputStream(tarEntry.getFile());) { Line 41: if (is.read(content) == -1) { you can drop it when you rebase, if we reach the EOF something is wrong and exception should be thrown Line 42: log.errorFormat("File {0} could not be read ", tarEntry.getFile()); Line 43: } Line 44: } Line 45: fileContent.put(tarEntry.getName(), ByteBuffer.wrap(content)); Line 52: public void close() throws IOException { Line 53: tarInputStream.close(); Line 54: } Line 55: Line 56: protected Log log = LogFactory.getLog(getClass()); please move this to the top when you rebase and make this static (but you can drop it imo). -- To view, visit http://gerrit.ovirt.org/29039 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie4fbc12337c16baca4be8a82d4a51b8b3ab0af4a Gerrit-PatchSet: 8 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches