--- FileCacheSeekableStream.java.orig 2011-10-19 22:07:36.000000000 +0200 +++ FileCacheSeekableStream.java 2011-10-19 23:12:32.000000000 +0200 @@ -311,11 +311,10 @@ */ public void run() { if (tempFiles != null && tempFiles.size() > 0) { - Iterator fileIter = tempFiles.iterator(); - while (fileIter.hasNext()) { + File[] filesToDelete = (File[])tempFiles.toArray(new File[tempFiles.size()]); + for (int i = 0; i < filesToDelete.length; i++) { try { - File file = (File) fileIter.next(); - file.delete(); + filesToDelete[i].delete(); } catch (Exception e) { // Ignore }