Skip to content

Commit

Permalink
[Java]: make sure to cast to long so that large values don't go negat…
Browse files Browse the repository at this point in the history
…ive. Issue #388.
  • Loading branch information
tmontgomery committed Aug 22, 2017
1 parent 081fb6e commit 6c0a68e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public static int computeTermOffsetFromPosition(final long position, final int p
*/
public static long computeLogLength(final int termLength)
{
return (termLength * PARTITION_COUNT) + LOG_META_DATA_LENGTH;
return ((long)termLength * PARTITION_COUNT) + LOG_META_DATA_LENGTH;
}

/**
Expand Down

0 comments on commit 6c0a68e

Please sign in to comment.