Skip to content

Commit

Permalink
Fixed a type change in SQL outputs.
Browse files Browse the repository at this point in the history
Refs #158
  • Loading branch information
The4thLaw committed Mar 1, 2024
1 parent 357bba0 commit e91eff4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.demyo.dao;

import java.math.BigInteger;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -42,8 +41,9 @@ public List<Tag> findAllWithUsageCounts() {
Map<Long, Integer> occurrences = new HashMap<>();
for (Object result : results) {
Object[] row = (Object[]) result;
occurrences.put(Long.valueOf((int) row[0]), ((BigInteger) row[1]).intValue()); // Doubt we'll have > 2^32
// albums
long id = ((Number) row[0]).longValue();
int count = ((Number) row[1]).intValue();
occurrences.put(id, count);
}

// Set all counts one by one
Expand Down

0 comments on commit e91eff4

Please sign in to comment.