Skip to content

Commit dca478a

Browse files
nicoschmdtwinterhazel
authored andcommitted
Apply suggestions from code review
Co-authored-by: Fabricio Duarte <[email protected]>
1 parent 59ec90c commit dca478a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/src/main/java/org/apache/cloudstack/api/command/admin/management/RemoveManagementServerCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE
5252
SuccessResponse response = new SuccessResponse(getCommandName());
5353
this.setResponseObject(response);
5454
} else {
55-
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove Management Server");
55+
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove Management Server.");
5656
}
5757
}
5858

server/src/main/java/com/cloud/server/ManagementServerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5530,11 +5530,11 @@ public boolean removeManagementServer(RemoveManagementServerCmd cmd) {
55305530
ManagementServerJoinVO managementServer = managementServerJoinDao.findById(id);
55315531

55325532
if (managementServer == null) {
5533-
throw new InvalidParameterValueException(String.format("Unable to find a Management Server with ID equal to [%s]", managementServer.getUuid()));
5533+
throw new InvalidParameterValueException(String.format("Unable to find a Management Server with ID equal to [%s].", managementServer.getUuid()));
55345534
}
55355535

55365536
if (!ManagementServerHost.State.Down.equals(managementServer.getState())) {
5537-
throw new InvalidParameterValueException(String.format("Unable to remove Management Server with ID [%s]. It can only be removed when it is in the [%s] state, however currently it is in the [%s] state", managementServer.getUuid(), ManagementServerHost.State.Down.name(), managementServer.getState().name()));
5537+
throw new InvalidParameterValueException(String.format("Unable to remove Management Server with ID [%s]. It can only be removed when it is in the [%s] state, however currently it is in the [%s] state.", managementServer.getUuid(), ManagementServerHost.State.Down.name(), managementServer.getState().name()));
55385538
}
55395539

55405540
managementServer.setRemoved(new Date());

0 commit comments

Comments
 (0)