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

ben-manes / caffeine / 2258
100%

Build:
DEFAULT BRANCH: master
Ran 21 Feb 2018 07:57PM UTC
Jobs 1
Files 66
Run time 4s
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
2258

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.

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

5751 of 6116 relevant lines covered (94.03%)

0.94 hits per line

Coverage Regressions

Lines Coverage ∆ File
73
100.0
caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java
2
100.0
caffeine/src/main/java/com/github/benmanes/caffeine/SingleConsumerQueue.java
Jobs
ID Job ID Ran Files Coverage
2 2258.2 (GROUP=tests) 21 Feb 2018 07:57PM UTC 0
94.03
Travis Job 2258.2
Source Files on build 2258
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2258
  • 11192537 on github
  • Prev Build on master (#2256)
  • Next Build on master (#2260)
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