@@ -24,7 +24,7 @@ package com.microsoft.azure.hdinsight.spark.run.action
2424
2525import com.intellij.execution.ExecutionException
2626import com.intellij.execution.ProgramRunnerUtil
27- import com.intellij.execution.configuration.AbstractRunConfiguration
27+ import com.intellij.execution.configurations.RunConfigurationBase
2828import com.intellij.execution.configurations.RunnerSettings
2929import com.intellij.execution.impl.RunDialog
3030import com.intellij.execution.runners.ExecutionEnvironment
@@ -60,7 +60,7 @@ object RunConfigurationActionUtils: ILogger {
6060
6161 val ideaSchedulers = IdeaSchedulers (environment.project)
6262
63- fromCallable { checkRunnerSettings(environment.runProfile as AbstractRunConfiguration , runner) }
63+ fromCallable { checkRunnerSettings(environment.runProfile as RunConfigurationBase < * > , runner) }
6464 .subscribeOn(ideaSchedulers.dispatchUIThread()) // Check Runner Settings in EDT
6565 .flatMap { checkAndPrepareRunProfileState(it, runner, ideaSchedulers) }
6666 .retryWhen { errOb -> errOb.observeOn(ideaSchedulers.dispatchUIThread() )
@@ -103,16 +103,16 @@ object RunConfigurationActionUtils: ILogger {
103103 " Cancel Submit" ,
104104 Messages .getErrorIcon()) == YES
105105
106- private fun checkRunnerSettings (runProfile : AbstractRunConfiguration , runner : ProgramRunner <RunnerSettings >)
107- : AbstractRunConfiguration {
106+ private fun < T : Any ?> checkRunnerSettings (runProfile : RunConfigurationBase < T > , runner : ProgramRunner <RunnerSettings >)
107+ : RunConfigurationBase < T > {
108108 assertInDispatchThread()
109109
110110 runProfile.checkRunnerSettings(runner, null , null )
111111
112112 return runProfile
113113 }
114114
115- private fun checkAndPrepareRunProfileState (runProfile : AbstractRunConfiguration ,
115+ private fun < T : Any ?> checkAndPrepareRunProfileState (runProfile : RunConfigurationBase < T > ,
116116 runner : ProgramRunner <RunnerSettings >,
117117 ideaSchedulers : IdeaSchedulers ): Observable <out Any ?> {
118118 if (runProfile !is RunProfileStatePrepare <* >) {
0 commit comments