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

ben-manes / caffeine / #5665
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v3.dev
DEFAULT BRANCH: master
Ran 20 Jul 2026 03:53AM UTC
Jobs 1
Files 78
Run time 1min
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

20 Jul 2026 03:32AM UTC coverage: 99.976% (-0.02%) from 100.0%
#5665

push

github

ben-manes
Propagate a synchronous jcache listener exception

JSR-107 requires a synchronous CacheEntryListener exception to propagate
to the caller, wrapped as a CacheEntryListenerException (javax.cache.event
package-info: "this will propagate back to the caller"; CacheEntryListener:
"catch any other Exception ... wrap and rethrow"). The EventDispatcher
swallowed it: EventTypeAwareListener.dispatch caught and logged, so the
synchronous future completed normally and awaitSynchronous never saw the
failure.

Now dispatch returns the exception (a CacheEntryListenerException as-is, or
a RuntimeException wrapped in one; an Error is logged and rethrown as-is,
not wrapped, matching the RI which catches only Exception); the per-key
chain future carries it as its result -- so a throwing listener never fails
the future and same-key ordering is preserved -- and awaitSynchronous throws
the first (extras addSuppressed). An asynchronous or quiet (background
refresh reload / native eviction) failure is logged, not propagated (no
synchronous caller); an executor-level failure surfaces as a
CacheEntryListenerException, and a listener Error propagates as-is.

The ecosystem is split (all source-verified): spec + RI + cache2k +
Hazelcast + Infinispan propagate; Ehcache 3 and Coherence -- the two
executor-dispatch implementations, as Caffeine was -- swallow and log.
Followed the spec and the RI.

Pinned by EventDispatcherTest (sync propagates and wraps, async swallowed,
same-key chain survives a throw, multiple exceptions suppressed) and
EventTypeAwareListenerTest. Catalogued in jsr107-conformance.md, whose
filter-exception entry is corrected: a filter runs inside the compute so it
must swallow, while the listener runs after commit so it can propagate.

4199 of 4207 branches covered (99.81%)

31 of 33 new or added lines in 2 files covered. (93.94%)

8473 of 8475 relevant lines covered (99.98%)

1.0 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
98.82
-1.18% jcache/src/main/java/com/github/benmanes/caffeine/jcache/event/EventDispatcher.java
1
98.04
-1.96% jcache/src/main/java/com/github/benmanes/caffeine/jcache/event/EventTypeAwareListener.java
Jobs
ID Job ID Ran Files Coverage
1 #5665.1 20 Jul 2026 03:53AM UTC 78
99.98
Source Files on build #5665
  • Tree
  • List 78
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 55479ebf on github
  • Prev Build on v3.dev
  • Next Build on v3.dev
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc