Skip to content

Commit b656688

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

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

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

55735573
if (!ManagementServerHost.State.Down.equals(managementServer.getState())) {
5574-
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()));
5574+
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()));
55755575
}
55765576

55775577
managementServer.setRemoved(new Date());

0 commit comments

Comments
 (0)