Copilot commented on code in PR #13615:
URL: https://github.com/apache/cloudstack/pull/13615#discussion_r3580070516
##########
api/src/main/java/org/apache/cloudstack/api/command/admin/network/NetworkOfferingBaseCmd.java:
##########
@@ -430,9 +432,8 @@ public Map<Network.Capability, String>
getServiceCapabilities(Network.Service se
public Map<String, String> getDetails() {
if (details == null || details.isEmpty()) {
- return null;
+ return sourceDetailsMap;
}
Review Comment:
This change alters getDetails() to return a new internal fallback map
(sourceDetailsMap). There are existing clone-related tests, but none appear to
exercise the regression scenario that triggered the reported ClassCastException
(cloning a source offering that has NetworkOfferingDetails like
internetProtocol=IPv4 and other details). Adding a unit/integration test that
clones an offering with at least one stored detail and asserts the clone path
completes without throwing (and preserves expected details) would help prevent
reintroducing this failure.
--
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]