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



##########
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:
       In short, prior to these changes the invoke() method only set the 
boolean variable retrieved in case of valid/invalid. After these changes, if it 
is invalid invoke() throws an exception, so no need to check isInvalid() in 
this line




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