Skip to content

Commit

Permalink
nextRange is stored in the database as hex, and needs to be converted…
Browse files Browse the repository at this point in the history
… to Dec BigInteger to add increment correctly
  • Loading branch information
parrjd committed Sep 4, 2024
1 parent f3c1ec9 commit 30e0927
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,10 @@ public String getNextRange() throws EBaseException {
}

String nextRange = attr.getStringValues().nextElement();
BigInteger nextRangeNo = new BigInteger(nextRange);
BigInteger nextRangeNo = new BigInteger(nextRange, mRadix);
BigInteger newNextRangeNo = nextRangeNo.add(mIncrementNo);
String newNextRange = newNextRangeNo.toString();
String endRange = newNextRangeNo.subtract(BigInteger.ONE).toString();
String newNextRange = newNextRangeNo.toString(mRadix);
String endRange = newNextRangeNo.subtract(BigInteger.ONE).toString(mRadix);

logger.info("Repository: Updating " + DBSubsystem.PROP_NEXT_RANGE + " from " + nextRange + " to " + newNextRange);

Expand Down

0 comments on commit 30e0927

Please sign in to comment.