Spaceman1984 commented on a change in pull request #4138:
URL: https://github.com/apache/cloudstack/pull/4138#discussion_r451315166



##########
File path: 
core/src/main/java/com/cloud/storage/template/HttpTemplateDownloader.java
##########
@@ -243,7 +247,6 @@ private boolean copyBytes(File file, InputStream in, 
RandomAccessFile out) throw
                 offset = writeBlock(bytes, out, block, offset);
                 if (!verifyFormat.isVerifiedFormat() && (offset >= 1048576 || 
offset >= remoteSize)) { //let's check format after we get 1MB or full file
                     verifyFormat.invoke();
-                    if (verifyFormat.isInvalid()) return true;

Review comment:
       @rhtyd If validation fails, an exception is thrown, so there is no 
setting of an invalid state that has to be checked.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to