Skip to content

Commit

Permalink
Merge pull request #27 from NASA-AMMOS/CWS-610
Browse files Browse the repository at this point in the history
More explicit casting to avoid arithmetic overflow.
  • Loading branch information
ztaylor54 authored Mar 1, 2021
2 parents ae6af24 + 4dea1f8 commit aea0963
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void run() {

while (true) {
try {
sleep(threadInterval * MILLIS_PER_SEC);
sleep((long)threadInterval * MILLIS_PER_SEC);

// Publish the max queue pending time metric to AWS
Long maxPendingQueueTime = getMaxPendingQueueTime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public void run() {
try {
if (emptyPollsBeforeWait == NUM_TRIES_BEFORE_WAIT) {
emptyPollsBeforeWait = 0;
Thread.sleep(1000 * pollPeriod);
Thread.sleep(1000 * (long)pollPeriod);
}
} catch (InterruptedException ie) {
log.warn("Thread interrupted.");
Expand Down

0 comments on commit aea0963

Please sign in to comment.