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

ben-manes / caffeine / 2258 / 2
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 21 Feb 2018 07:57PM UTC
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

21 Feb 2018 06:44PM UTC coverage: 94.032% (-0.03%) from 94.064%
GROUP=tests

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.

5751 of 6116 relevant lines covered (94.03%)

0.94 hits per line

Source Files on job 2258.2 (GROUP=tests)
  • Tree
  • List 0
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1
  • Travis Job 2258.2
  • 11192537 on github
  • Prev Job for GROUP=tests on master (#2256.2)
  • Next Job for GROUP=tests on master (#2260.2)
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