[ https://issues.apache.org/jira/browse/LUCENE-6075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14224423#comment-14224423 ]
ASF subversion and git services commented on LUCENE-6075: --------------------------------------------------------- Commit 1641584 from [~mikemccand] in branch 'dev/trunk' [ https://svn.apache.org/r1641584 ] LUCENE-6075: don't overflow int in SimpleRateLimiter > SimpleRateLimiter cast overflow results in Thread.sleep exception > ----------------------------------------------------------------- > > Key: LUCENE-6075 > URL: https://issues.apache.org/jira/browse/LUCENE-6075 > Project: Lucene - Core > Issue Type: Bug > Components: core/store > Reporter: Boaz Leskes > Assignee: Michael McCandless > Fix For: Trunk, 5.x > > Attachments: LUCENE-6075.patch > > > SimpleRateLimiter.pause() uses an uncheck cast of longs to ints: > Thread.sleep((int) (pauseNS/1000000), (int) (pauseNS % 1000000)); > Although we check that pauseNS is positive, however if it's large enough the > cast to int produces a negative value, causing Thread.sleep to throw an > exception. > We should protect for it. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org