Skip to content

Commit 77aa0a8

Browse files
Apply suggestions from code review
Co-authored-by: Fabricio Duarte <[email protected]>
1 parent 9efb35d commit 77aa0a8

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
@@ -5508,11 +5508,11 @@ public boolean removeManagementServer(RemoveManagementServerCmd cmd) {
55085508
ManagementServerJoinVO managementServer = managementServerJoinDao.findById(id);
55095509

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

55145514
if (!ManagementServerHost.State.Down.equals(managementServer.getState())) {
5515-
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()));
5515+
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()));
55165516
}
55175517

55185518
managementServer.setRemoved(new Date());

0 commit comments

Comments
 (0)