DaanHoogland commented on code in PR #7029:
URL: https://github.com/apache/cloudstack/pull/7029#discussion_r1060422420
##########
api/src/main/java/com/cloud/vm/VirtualMachine.java:
##########
@@ -122,7 +123,8 @@ public static StateMachine2<State, VirtualMachine.Event,
VirtualMachine> getStat
s_fsm.addTransition(new Transition<State, Event>(State.Stopping,
VirtualMachine.Event.AgentReportStopped, State.Stopped, Arrays.asList(new
Impact[]{Impact.USAGE})));
s_fsm.addTransition(new Transition<State, Event>(State.Stopping,
VirtualMachine.Event.StopRequested, State.Stopping, null));
s_fsm.addTransition(new Transition<State, Event>(State.Stopping,
VirtualMachine.Event.AgentReportShutdowned, State.Stopped, Arrays.asList(new
Impact[]{Impact.USAGE})));
- s_fsm.addTransition(new Transition<State, Event>(State.Expunging,
VirtualMachine.Event.OperationFailed, State.Expunging,null));
+ s_fsm.addTransition(new Transition<State, Event>(State.Expunging,
VirtualMachine.Event.OperationSucceeded, State.Expunged, null));
+ s_fsm.addTransition(new Transition<State, Event>(State.Expunging,
VirtualMachine.Event.OperationFailed, State.Error,null));
Review Comment:
sonar comment:
```suggestion
s_fsm.addTransition(new Transition<>(State.Expunging,
VirtualMachine.Event.OperationSucceeded, State.Expunged, null));
s_fsm.addTransition(new Transition<>(State.Expunging,
VirtualMachine.Event.OperationFailed, State.Error,null));
```
makes sense not to adhere to this old standard.
--
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]