Skip to content

Commit

Permalink
Fix: ClassCastException if EntryListener implements Closeable, tracke…
Browse files Browse the repository at this point in the history
  • Loading branch information
cruftex committed Jun 8, 2016
1 parent 3ee3723 commit 38e2fbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cache-ri-impl/src/main/java/org/jsr107/ri/RICache.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ public synchronized void close() {
for (RICacheEntryListenerRegistration registration : listenerRegistrations) {
if (registration.getCacheEntryListener() instanceof Closeable) {
try {
((Closeable) registration).close();
((Closeable) registration.getCacheEntryListener()).close();
} catch (IOException e) {
Logger.getLogger(this.getName()).log(Level.WARNING, "Problem " +
"closing listener " + cacheLoader.getClass(), e);
Expand Down

0 comments on commit 38e2fbb

Please sign in to comment.