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

"java.lang.UnsupportedOperationException: Operation is not supported for read-only collection" #1571

nkibler opened this issue Jul 27, 2017 · 0 comments


None yet
1 participant
Copy link

commented Jul 27, 2017

Partial stacktrace from crash report:

java.lang.UnsupportedOperationException: Operation is not supported for read-only collection
	at kotlin.collections.EmptyList.add(Collections.kt)
	at com.intellij.remoteServer.impl.configuration.deployment.DeployToServerConfigurationType$DeployToServerConfigurationFactory.setupDeploymentSource(
	at com.intellij.remoteServer.impl.configuration.deployment.DeployToServerConfigurationType$DeployToServerConfigurationFactory.onNewConfigurationCreated(
	at com.intellij.remoteServer.impl.configuration.deployment.DeploymentConfigurationManagerImpl.createAndRunConfiguration(
	at com.intellij.openapi.actionSystem.ex.ActionUtil$

The problem lines of code are:

List<BeforeRunTask> tasks = runManager.getBeforeRunTasks(configuration);

The likely cause is that IDEA replaced the underlying implementation of the RunManagerEx with a Kotlin source, in the process returning a read-only collection (maybe only sometimes?) from .getBeforeRunTasks(). An easy fix is to change this logic to build a new list from its contents instead; I'll send a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.