weizhouapache commented on a change in pull request #5469:
URL: https://github.com/apache/cloudstack/pull/5469#discussion_r713642555



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -2882,17 +2896,18 @@ protected boolean applyUserData(HypervisorType 
hyperVisorType, UserVm vm, Nic ni
     @Override
     @ActionEvent(eventType = EventTypes.EVENT_VM_START, eventDescription = 
"starting Vm", async = true)
     public UserVm startVirtualMachine(StartVMCmd cmd) throws 
ExecutionException, ConcurrentOperationException, ResourceUnavailableException, 
InsufficientCapacityException, ResourceAllocationException {
-        Map<VirtualMachineProfile.Param, Object> additonalParams = null;
+        Map<VirtualMachineProfile.Param, Object> additonalParams = new 
HashMap<>();
         if (cmd.getBootIntoSetup() != null) {
-            if (additonalParams == null) {
-                additonalParams = new HashMap<>();
-            }
+            additonalParams = new HashMap<>();

Review comment:
       2901 can be removed




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


Reply via email to