Removed the exec(String...) method in KotlinCompiler
It's important to be aware of what stream the messages will be written to, so such a default implementation is harmful
This commit is contained in:
@@ -72,7 +72,7 @@ public class KotlinCompiler {
|
||||
*/
|
||||
public static void doMain(KotlinCompiler compiler, String[] args) {
|
||||
try {
|
||||
ExitCode rc = compiler.exec(args);
|
||||
ExitCode rc = compiler.exec(System.out, args);
|
||||
if (rc != OK) {
|
||||
System.err.println("exec() finished with " + rc + " return code");
|
||||
System.exit(rc.getCode());
|
||||
@@ -83,10 +83,6 @@ public class KotlinCompiler {
|
||||
}
|
||||
}
|
||||
|
||||
public ExitCode exec(String... args) {
|
||||
return exec(System.out, args);
|
||||
}
|
||||
|
||||
public ExitCode exec(PrintStream errStream, String... args) {
|
||||
CompilerArguments arguments = createArguments();
|
||||
if (!parseArguments(errStream, arguments, args)) {
|
||||
|
||||
Reference in New Issue
Block a user