rafaelweingartner commented on issue #2298: CLOUDSTACK-9620: Enhancements for managed storage URL: https://github.com/apache/cloudstack/pull/2298#issuecomment-355655356 @mike-tutkowski my comment was under one of Daan?s where the validations are inverted in class ?StorageSystemDataMotionStrategy.java?. Here follows what I said there: > Documentation could help. However, I would first suggesting extracting lines 308-327 to a method. Then, instead of starting with if (canHandleSrc && canHandleDest), you can do the following: > > if (!canHandleSrc){Throw exception regarding source not being able to handle the request} > if (!canHandleDest){Throw exception regarding destination not being able to handle the request } > > Then, if you pass those two IFs, you do not need a third one to check if (canHandleSrc && canHandleDest) >
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
