Hi there,

I did look a that initially, however it meant making a change to the parent 
method. Not knowing where else this was called from, I didn't want to introduce 
more bugs elsewhere. I agree It's the best thing to do, however I saw the 
immediate need to not have the situation where an error occurs and the log says 
it all went smoothly.

If this patch is committed, it won't break when the parent method does get 
resolved, it will just be redundant. I hope to get the suggested more 
encompassing fix done when I can see all the instances where it's used.

I hope my thought process makes sense?


Regards

Alex Hitchins

D: +44 1892 523 587 | S: +44 2036 030 540<tel:+442036030540> | M: 
+44<tel:+447968161581> 7788 423 969

alex.hitch...@shapeblue.com<mailto:alex.hitch...@shapeblue.com>

From: Laszlo Hornyak [mailto:laszlo.horn...@gmail.com]
Sent: 25 March 2014 22:18
To: dev@cloudstack.apache.org<mailto:dev@cloudstack.apache.org>; Alex Hitchins
Subject: Re: Review Request 19616: Added check for null return.

Hi,
I have just looked into this, looks quite safe to me and follows the 
conventions of the code.
However, what about a little change in the conventions? Wouldn't it be more 
simple not to return null if the operation failed?
This could help simplifying the code by eliminating lots of null-checks, and 
also the service implementations could become more simple.

On Tue, Mar 25, 2014 at 4:04 PM, Alex Hitchins 
<alex.hitch...@shapeblue.com<mailto:alex.hitch...@shapeblue.com>> wrote:

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19616/
-----------------------------------------------------------

Review request for cloudstack.


Repository: cloudstack-git


Description
-------

Added check for returned null, if received then throw exception.


Diffs
-----

  server/src/com/cloud/storage/VolumeApiServiceImpl.java 5ffa99b

Diff: https://reviews.apache.org/r/19616/diff/


Testing
-------

Compiled & ran.


Thanks,

Alex Hitchins



--

EOF
Need Enterprise Grade Support for Apache CloudStack?
Our CloudStack Infrastructure 
Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the 
best 24/7 SLA for CloudStack Environments.

Apache CloudStack Bootcamp training courses

**NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
18th-19th February 2014, Brazil. 
Classroom<http://shapeblue.com/cloudstack-training/>
17th-23rd March 2014, Region A. Instructor led, 
On-line<http://shapeblue.com/cloudstack-training/>
24th-28th March 2014, Region B. Instructor led, 
On-line<http://shapeblue.com/cloudstack-training/>
16th-20th June 2014, Region A. Instructor led, 
On-line<http://shapeblue.com/cloudstack-training/>
23rd-27th June 2014, Region B. Instructor led, 
On-line<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended 
solely for the use of the individual to whom it is addressed. Any views or 
opinions expressed are solely those of the author and do not necessarily 
represent those of Shape Blue Ltd or related companies. If you are not the 
intended recipient of this email, you must neither take any action based upon 
its contents, nor copy or show it to anyone. Please contact the sender if you 
believe you have received this email in error. Shape Blue Ltd is a company 
incorporated in England & Wales. ShapeBlue Services India LLP is a company 
incorporated in India and is operated under license from Shape Blue Ltd. Shape 
Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is 
operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Reply via email to