DaanHoogland commented on code in PR #7372:
URL: https://github.com/apache/cloudstack/pull/7372#discussion_r1149313724
##########
server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java:
##########
@@ -1576,11 +1576,11 @@ protected Pair<Map<Volume, List<StoragePool>>,
List<Volume>> findSuitablePoolsFo
// for each volume find list of suitable storage pools by calling the
// allocators
- Set<Long> originalAvoidPoolSet = avoid.getPoolsToAvoid();
- if (originalAvoidPoolSet == null) {
- originalAvoidPoolSet = new HashSet<Long>();
+ Set<Long> originalAvoidPoolSet = new HashSet<>();
+ if (avoid.getPoolsToAvoid() != null) {
+ originalAvoidPoolSet.addAll(avoid.getPoolsToAvoid());
}
- Set<Long> poolsToAvoidOutput = new HashSet<Long>(originalAvoidPoolSet);
+ Set<Long> poolsToAvoidOutput = new HashSet<>(originalAvoidPoolSet);
Review Comment:
thanks @harikrishna-patnala it still doesn´t read logical, but with your
explanation it makes total sense :+1:
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]