Skip to content

Commit

Permalink
Addresses incompatibilities with mysql 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
dbernstein committed Nov 12, 2021
1 parent 4ae268c commit 1a5e8fa
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
package org.duracloud.durastore.rest;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
Expand Down Expand Up @@ -57,7 +56,7 @@ public List<SpaceStatsDTO> getSpaceStats(String accountId,
this.spaceStatsRepo.getByAccountIdAndStoreIdAndSpaceId(accountId, storeId, spaceId, start, end, interval);
List<SpaceStatsDTO> dtos = new ArrayList<>(list.size());
for (Object[] s : list) {
dtos.add(new SpaceStatsDTO(new Date(((BigInteger) s[0]).longValue() * 1000),
dtos.add(new SpaceStatsDTO(new Date(((Number) s[0]).longValue() * 1000),
s[1].toString(),
s[2].toString(),
s[3].toString(),
Expand Down Expand Up @@ -93,7 +92,7 @@ public List<StoreStatsDTO> getStorageProviderStats(String account,
List<Object[]> list = this.spaceStatsRepo.getByAccountIdAndStoreId(account, storeId, start, end, interval);
List<StoreStatsDTO> dtos = new ArrayList<>(list.size());
for (Object[] s : list) {
dtos.add(new StoreStatsDTO(new Date(((BigInteger) s[0]).longValue() * 1000),
dtos.add(new StoreStatsDTO(new Date(((Number) s[0]).longValue() * 1000),
s[1].toString(),
s[2].toString(),
((BigDecimal) s[3]).longValue(),
Expand Down

0 comments on commit 1a5e8fa

Please sign in to comment.