[GRADLE-901] ConcurrentModificationException when adding a listener in the initscript Created: 11/Apr/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Tomer Cohen Assignee: Adam Murdoch
Resolution: Fixed Votes: 0


 Description   

org.gradle.api.GradleException: java.util.ConcurrentModificationException
at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:99)
at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:31)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:59)
at $Proxy7.projectsLoaded(Unknown Source)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:159)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:114)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
at org.gradle.launcher.Main.execute(Main.java:93)
at org.gradle.launcher.Main.main(Main.java:42)
at org.gradle.launcher.GradleMain.main(GradleMain.java:54)
Caused by: java.util.ConcurrentModificationException: null
at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:105)
at org.gradle.messaging.dispatch.BroadcastDispatch.dispatch(BroadcastDispatch.java:95)
... 9 common frames omitted



 Comments   
Comment by Tomer Cohen [ 11/Apr/10 ]

This happens when I call addListener in my init-script in combination with an apply from which also defines an addListener!
See as follows:

initscript {
apply

{ apply from: 'http://gradle.artifactoryonline.com/gradle/repo/artifactoryinitplugin/artifactoryinitplugin/0.5-SNAPSHOT/artifactoryinitplugin-0.5-SNAPSHOT.gradle' }

}
addListener(new BuildAdapter())

Generated at Wed Jun 30 11:41:50 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.