• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ben-manes / caffeine / 2256
100%

Build:
DEFAULT BRANCH: master
Ran 21 Feb 2018 10:33AM UTC
Jobs 1
Files 66
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2256

push

travis-ci

ben-manes
Fix variable expiration overflowing with the maximum duration (fixes #217)

When the duration is set to the maximum length, Long.MAX_VALUE nanoseconds,
the calcuation of expirationTime - currentTime > 0 may overflow and be
negative. This will not occur if the same thread calculates both timestamps.
It may occur across threads when the expirationTime is concurrently updated
using a later base time than t1's reading of the currentTime. This can
occur whenever the maintenance work is triggered to sweep expired entries
and a user thread accesses the entry. The later timestamp plus the maximum
duration results in an overflow, causing the remaining time to be negative,
and therefore causes the cache to expire the entry.

The internal maximum is now capped at Long.MAX_VALUE / 2 or ~150 years. This
should give a broad safety net to avoid these concurrency-inducing overflows
in normal code.

12 of 12 new or added lines in 2 files covered. (100.0%)

5752 of 6115 relevant lines covered (94.06%)

0.94 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
100.0
caffeine/src/main/java/com/github/benmanes/caffeine/SingleConsumerQueue.java
Jobs
ID Job ID Ran Files Coverage
2 2256.2 (GROUP=tests) 21 Feb 2018 10:33AM UTC 0
94.06
Travis Job 2256.2
Source Files on build 2256
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2256
  • 25209636 on github
  • Prev Build on master (#2252)
  • Next Build on master (#2258)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc