Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.4-alpha
-
None
-
Reviewed
Description
FileInputStreamCache leaves around a reference to its cacheCleaner after close().
The cacheCleaner is created like this:
if (cacheCleaner == null) { cacheCleaner = new CacheCleaner(); executor.scheduleAtFixedRate(cacheCleaner, expiryTimeMs, expiryTimeMs, TimeUnit.MILLISECONDS); }
and supposedly removed like this:
if (cacheCleaner != null) { executor.remove(cacheCleaner); }
However, ScheduledThreadPoolExecutor.remove returns a success boolean which should be checked. And I think from a quick read of that class that the return value of scheduleAtFixedRate should be used as the argument to remove.