Github user jburwell commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1371#discussion_r62780906
--- Diff: server/src/com/cloud/network/NetworkServiceImpl.java ---
@@ -2111,8 +2098,9 @@ public Network updateGuestNetwork(final long
networkId, String name, String disp
}
}
- final Map<String, String> newSvcProviders = networkOfferingChanged
? _networkMgr.finalizeServicesAndProvidersForNetwork(
- _entityMgr.findById(NetworkOffering.class,
networkOfferingId), network.getPhysicalNetworkId()) : new HashMap<String,
String>();
+ final Map<String, String> newSvcProviders = networkOfferingChanged
+ ?
_networkMgr.finalizeServicesAndProvidersForNetwork(_entityMgr.findById(NetworkOffering.class,
networkOfferingId), network.getPhysicalNetworkId())
+ : new HashMap<String, String>();
--- End diff --
Recognizing it is out of scope of this patch, but would it be possible to
change ``new HashMap<String, String>()`` to ``Collections.emptyMap()`` to avoid
unnecessary object creation when ``networkOfferingChanged`` is ``false``.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---