GutoVeronezi commented on pull request #4771:
URL: https://github.com/apache/cloudstack/pull/4771#issuecomment-792771594


   > @DaanHoogland @GutoVeronezi you were quicker than me, I pressed enter to 
send the message and then your comments appear.
   > 
   > Taking a deeper look, I think that both handle different situations. Very 
similar, but still complementary situations.
   > This one prevents also issue due to eventually null `srcVolumeInfo`.
   
   @GabrielBrascher The problem is that findByPoolTemplate receives a long 
(primitive type) to template and getTemplateId returns a Long (object type). 
Java will do an autounboxing, but as getTemplateId returns null for 
non-template volume (data disks), it will generate a NPE when trying to 
autounbox this value.


----------------------------------------------------------------
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:
[email protected]


Reply via email to