Skip to content

Commit

Permalink
Set Versions to 0 if space is empty.
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Chrzan <[email protected]>
Signed-off-by: mchrza <[email protected]>
  • Loading branch information
mchrza committed Dec 13, 2024
1 parent 38f01b9 commit b84117c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ public ChangesetsStatisticsResponse handle(ResultSet rs) throws SQLException {
if(rs.next()){
String maxV = rs.getString("max");
String minV = rs.getString("min");
long maxVersion = (maxV == null ? -1 : Long.parseLong(maxV));
long maxVersion = (maxV == null ? 0 : Long.parseLong(maxV));
//FIXME: Returned minVersion is not always correct for spaces with v2k=1
long minVersion = (minV == null ? 0 : Long.parseLong(minV));

csr.setMaxVersion(maxVersion);
csr.setMinVersion(maxVersion == -1 ? -1 : minVersion);
csr.setMinVersion(maxVersion == 0 ? 0 : minVersion);
csr.setTagMinVersion(minTagVersion);
}
return csr;
Expand Down

0 comments on commit b84117c

Please sign in to comment.