Skip to content

Commit

Permalink
Merge pull request #22582 from geoand/#22581
Browse files Browse the repository at this point in the history
Prevent Maven compiler parameters from being used in Kotlin compiler
  • Loading branch information
geoand authored Jan 3, 2022
2 parents 2c4ff2e + 482cabd commit 6311802
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import java.util.stream.Collectors;

import org.jboss.logging.Logger;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.cli.common.ExitCode;
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments;
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation;
Expand Down Expand Up @@ -75,9 +73,6 @@ public void compile(Set<File> filesToCompile, Context context) {
compilerArguments.setSuppressWarnings(true);
SimpleKotlinCompilerMessageCollector messageCollector = new SimpleKotlinCompilerMessageCollector();
K2JVMCompiler compiler = new K2JVMCompiler();
if (context.getCompilerOptions() != null && !context.getCompilerOptions().isEmpty()) {
compiler.parseArguments(context.getCompilerOptions().toArray(new String[0]), compilerArguments);
}

ExitCode exitCode = compiler.exec(
messageCollector,
Expand Down Expand Up @@ -130,8 +125,7 @@ public List<String> getErrors() {
}

@Override
public void report(@NotNull CompilerMessageSeverity severity, @NotNull String s,
@Nullable CompilerMessageSourceLocation location) {
public void report(CompilerMessageSeverity severity, String s, CompilerMessageSourceLocation location) {
if (severity.isError()) {
if ((location != null) && (location.getLineContent() != null)) {
errors.add(String.format("%s%n%s:%d:%d%nReason: %s", location.getLineContent(), location.getPath(),
Expand Down

0 comments on commit 6311802

Please sign in to comment.