findbugs: null check for gateway and netmask instead of gateway
twice(cherry picked from commit
d30ddf6d59732fa30855811e7fe0aa639ee3849a)
CLOUDSTACK-5900: Failed to delete template/ISO that failed to download.
findbugs: retrieve the objects to remove from the collection(s)
findbugs: null-checks(cherry picked from commit
c58e509924e97dfced80981da5c27b9f3aae9b33)