Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScanFiles / Concurrent modification exception #486

Closed
ahus1 opened this issue Mar 28, 2020 · 1 comment
Closed

ScanFiles / Concurrent modification exception #486

ahus1 opened this issue Mar 28, 2020 · 1 comment

Comments

@ahus1
Copy link
Contributor

ahus1 commented Mar 28, 2020

I've changed some configurations and ran a scan. I received the following exception once, then the scan continued as usual. I wasn't able to reproduce it yet.

2020-03-28 20:52:21,716 [2118245]   INFO - .idea.checkstyle.StaticScanner - Scanning current file(s). 
2020-03-28 20:52:21,737 [2118266]   WARN - a.checkstyle.checker.ScanFiles - An error occurred while scanning a file. 
java.util.ConcurrentModificationException
	at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1493)
	at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1516)
	at java.base/java.lang.Iterable.forEach(Iterable.java:74)
	at org.infernus.idea.checkstyle.checker.ScanFiles.fireCheckStarting(ScanFiles.java:115)
	at org.infernus.idea.checkstyle.checker.ScanFiles.call(ScanFiles.java:77)
	at org.infernus.idea.checkstyle.checker.ScanFiles.call(ScanFiles.java:33)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.call(ApplicationImpl.java:274)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
@jshiell
Copy link
Owner

jshiell commented Mar 29, 2020

Thank you! I would expect it's probably not reproducible except by chance - IDEA has been changing the concurrency model in the past few releases, with the goal of increasing IDE responsiveness. While this is great, it is showing the age of this plugin - a lot of the code was written when we could expect no or at least a much lower of concurrency, and so there's various bits of code that need fixing to deal with this. This appears to be one of them - it should be fixed in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants