Liron Aravot has posted comments on this change.

Change subject: core: Adding support for TarInMemoryExport
......................................................................


Patch Set 11: Code-Review+2

(1 comment)

fix that minor issue, other than that +2.

http://gerrit.ovirt.org/#/c/29039/11/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 39: 
Line 40:             // Read file from the archive into byte array.
Line 41:             try (InputStream is = new 
FileInputStream(tarEntry.getFile());) {
Line 42:                 if (is.read(content) == -1) {
Line 43:                     log.errorFormat("File {0} could not be read ", 
tarEntry.getFile());
you need either to add continue here (no need to put it in the map) and imo 
it's better to throw exception in that case.
Line 44:                 }
Line 45:             }
Line 46:             fileContent.put(tarEntry.getName(), 
ByteBuffer.wrap(content));
Line 47:             tarEntry = tarInputStream.getNextTarEntry();


-- 
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: 11
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

Reply via email to