[api201 cleanup]  Use correct type for generic and remove obsolete suppress warnings
@@ -20,6 +20,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
import com.goide.execution.application.GoApplicationConfiguration;
import com.goide.execution.application.GoApplicationRunConfigurationType;
import com.goide.execution.application.GoApplicationRunningState;
+import com.goide.util.GoCommandLineParameter;
import com.goide.util.GoExecutor;
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableList;
@@ -189,37 +190,16 @@ public class BlazeGoRunConfigurationRunner implements BlazeCommandRunConfigurati
throw new ExecutionException("Workspace module not found");
}
GoApplicationRunningState nativeState =
- new DerivedGoApplicationRunningState(env, module, nativeConfig);
- nativeState.setOutputFilePath(executable.binary.getPath());
- return nativeState;
- }
-
- @Nullable
- @Override
- public ExecutionResult execute(Executor executor, ProgramRunner<?> runner) {
- return null;
- }
-
- // #api201: Remove 'unchecked' warning suppression, necessary for getBuildingTarget().
- // (background: b/148802231)
- @SuppressWarnings("unchecked")
- private static class DerivedGoApplicationRunningState extends GoApplicationRunningState {
-
- public DerivedGoApplicationRunningState(
- ExecutionEnvironment env, Module module, GoApplicationConfiguration configuration) {
- super(env, module, configuration);
- }
+ new GoApplicationRunningState(env, module, nativeConfig) {
@Override
public boolean isDebug() {
return true;
}
- // #api201: Super method uses different generic type for list in 2020.2.
- @SuppressWarnings({"rawtypes", "unchecked"})
@Nullable
@Override
- public List getBuildingTarget() {
+ public List<GoCommandLineParameter> getBuildingTarget() {
return null;
}
@@ -228,6 +208,15 @@ public class BlazeGoRunConfigurationRunner implements BlazeCommandRunConfigurati
public GoExecutor createBuildExecutor() {
return null;
}
+ };
+ nativeState.setOutputFilePath(executable.binary.getPath());
+ return nativeState;
+ }
+
+ @Nullable
+ @Override
+ public ExecutionResult execute(Executor executor, ProgramRunner<?> runner) {
+ return null;
}
}
