[
https://issues.apache.org/jira/browse/FELIX-4532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14075995#comment-14075995
]
Tuomas Kiviaho commented on FELIX-4532:
---------------------------------------
Main difference between Scanner and WatcherScanner implementation is that the
latter (which is a NIO2 implementation) has the following lines causing the
problem above
37 Set<File> changed = new HashSet<File>();
70 for (File file : changed)
...
83 changed.remove(file);
This could be fixed as:
37 Set<File> changed = new ConcurrentHashSet<File>();
70 for (Iterator<File> iterator = changed.iterator(); iterator.hasNext();)
...
83 iterator.remove();
felix.fileinstall.disableNio2=true option could perhaps be used as workaround
> ConcurrentModificationException in fileinstall
> ----------------------------------------------
>
> Key: FELIX-4532
> URL: https://issues.apache.org/jira/browse/FELIX-4532
> Project: Felix
> Issue Type: Bug
> Components: File Install
> Affects Versions: fileinstall-3.4.0
> Reporter: Guillaume Nodet
>
> {code}
> java.util.ConcurrentModificationException
> at java.util.HashMap$HashIterator.nextEntry(HashMap.java:926)[:1.7.0_51]
> at java.util.HashMap$KeyIterator.next(HashMap.java:960)[:1.7.0_51]
> at
> org.apache.felix.fileinstall.internal.WatcherScanner.scan(WatcherScanner.java:70)[5:org.apache.felix.fileinstall:3.4.0]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:305)[5:org.apache.felix.fileinstall:3.4.0]
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)