GabrielBrascher commented on a change in pull request #3551: Prevent 
NullPointer on a network with removed IP ranges/"VLANs"
URL: https://github.com/apache/cloudstack/pull/3551#discussion_r313892793
 
 

 ##########
 File path: engine/schema/src/main/java/com/cloud/dc/dao/VlanDaoImpl.java
 ##########
 @@ -167,7 +167,10 @@ public VlanDaoImpl() {
         List<PodVlanMapVO> vlanMaps = 
_podVlanMapDao.listPodVlanMapsByPod(podId);
         List<VlanVO> result = new ArrayList<VlanVO>();
         for (PodVlanMapVO pvmvo : vlanMaps) {
-            result.add(findById(pvmvo.getVlanDbId()));
+            VlanVO vlanByPodId = findById(pvmvo.getVlanDbId());
+            if (vlanByPodId != null && vlanByPodId.getRemoved() == null) {
 
 Review comment:
   I have added a commit addressing this comment. Thanks for the feedback, 
@rhtyd!

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


With regards,
Apache Git Services

Reply via email to