Skip to content

Commit eb98906

Browse files
Remove trailing lines that are breaking build due to checkstyle compliance
1 parent 4c7e78c commit eb98906

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

engine/schema/src/com/cloud/configuration/dao/ResourceCountDao.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,16 @@ public interface ResourceCountDao extends GenericDao<ResourceCountVO, Long> {
5757
Set<Long> listRowsToUpdateForDomain(long domainId, ResourceType type);
5858

5959
long removeEntriesByOwner(long ownerId, ResourceOwnerType ownerType);
60-
60+
6161
/**
6262
* Counts the number of CPU cores allocated for the given account.
63-
*
6463
* Side note: This method is not using the "resource_count" table. It is executing the actual count instead.
6564
*/
6665
long countCpuNumberAllocatedToAccount(long accountId);
67-
66+
6867
/**
6968
* Counts the amount of memory allocated for the given account.
70-
*
7169
* Side note: This method is not using the "resource_count" table. It is executing the actual count instead.
7270
*/
7371
long countMemoryAllocatedToAccount(long accountId);
74-
}
72+
}

engine/schema/src/com/cloud/configuration/dao/ResourceCountDaoImpl.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,16 +252,16 @@ public long removeEntriesByOwner(long ownerId, ResourceOwnerType ownerType) {
252252
return 0;
253253
}
254254

255-
private String baseSqlCountComputingResourceAllocatedToAccount = "Select "
256-
+ " SUM((CASE "
255+
private String baseSqlCountComputingResourceAllocatedToAccount = "Select "
256+
+ " SUM((CASE "
257257
+ " WHEN so.%s is not null THEN so.%s "
258-
+ " ELSE CONVERT(vmd.value, UNSIGNED INTEGER) "
258+
+ " ELSE CONVERT(vmd.value, UNSIGNED INTEGER) "
259259
+ " END)) as total "
260-
+ " from vm_instance vm "
260+
+ " from vm_instance vm "
261261
+ " join service_offering_view so on so.id = vm.service_offering_id "
262262
+ " left join user_vm_details vmd on vmd.vm_id = vm.id and vmd.name = '%s' "
263263
+ " where vm.type = 'User' and state not in ('Destroyed', 'Error', 'Expunging') and display_vm = true and account_id = ? ";
264-
264+
265265
@Override
266266
public long countCpuNumberAllocatedToAccount(long accountId) {
267267
String sqlCountCpuNumberAllocatedToAccount = String.format(baseSqlCountComputingResourceAllocatedToAccount, ResourceType.cpu, ResourceType.cpu, "cpuNumber");
@@ -279,7 +279,7 @@ private long executeSqlCountComputingResourcesForAccount(long accountId, String
279279
try (TransactionLegacy tx = TransactionLegacy.currentTxn()) {
280280
PreparedStatement pstmt = tx.prepareAutoCloseStatement(sqlCountComputingResourcesAllocatedToAccount);
281281
pstmt.setLong(1, accountId);
282-
282+
283283
ResultSet rs = pstmt.executeQuery();
284284
if (!rs.next()) {
285285
throw new CloudRuntimeException(String.format("An unexpected case happened while counting allocated computing resources for account: " + accountId));
@@ -289,5 +289,4 @@ private long executeSqlCountComputingResourcesForAccount(long accountId, String
289289
throw new CloudRuntimeException(e);
290290
}
291291
}
292-
293292
}

0 commit comments

Comments
 (0)