diff --git a/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java b/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java index b4cf809726d5..4e49bd0e0a3f 100644 --- a/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java +++ b/server/src/com/cloud/network/router/VpcNetworkHelperImpl.java @@ -154,14 +154,15 @@ public void reallocateRouterNetworks(final RouterDeploymentDefinition vpcRouterD publicVlans.add(publicIp.getVlanTag()); } } - if (publicNetwork != null) { - if (networks.get(publicNetwork) != null) { - @SuppressWarnings("unchecked") final List publicNicProfiles = (List)networks.get(publicNetwork); - publicNicProfiles.addAll(publicNics); - networks.put(publicNetwork, publicNicProfiles); - } else { - networks.put(publicNetwork, publicNics); - } + } + if (publicNetwork != null) { + if (networks.get(publicNetwork) != null) { + @SuppressWarnings("unchecked") + final List publicNicProfiles = (List)networks.get(publicNetwork); + publicNicProfiles.addAll(publicNics); + networks.put(publicNetwork, publicNicProfiles); + } else { + networks.put(publicNetwork, publicNics); } } @@ -187,4 +188,4 @@ public LinkedHashMap> configureDefaultNics(f return networks; } -} \ No newline at end of file +}