Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
Expand Down Expand Up @@ -1255,7 +1254,7 @@ private PrintWriter printWriter(File tempFile) throws IOException {

private String[] makeCommandLine(List<String> commandLineList) {
String[] commandLine = commandLineList.toArray(String[]::new);
log.info("Compilation arguments:\n" + String.join("\n", commandLine));
log.verbose("Compilation arguments:\n" + String.join("\n", commandLine)); // GROOVY-11658
return commandLine;
}

Expand Down Expand Up @@ -1313,20 +1312,17 @@ private void runCompiler(String[] commandLine) {
// unwrap to the real exception
t = e.getCause();
}
Writer writer = new StringBuilderWriter();
var writer = new StringBuilderWriter();
new ErrorReporter(t, false).write(new PrintWriter(writer));
String message = writer.toString();
log.error(writer.toString());

taskSuccess = false;
if (errorProperty != null) {
getProject().setNewProperty(errorProperty, "true");
}

if (failOnError) {
log.error(message);
throw new BuildException("Compilation Failed", t, getLocation());
} else {
log.error(message);
}
}
}
Expand Down Expand Up @@ -1409,7 +1405,7 @@ protected GroovyClassLoader buildClassLoaderFor() {

ClassLoader loader = getClass().getClassLoader();
if (loader instanceof AntClassLoader) {
AntClassLoader antLoader = (AntClassLoader) loader;
@SuppressWarnings("resource") AntClassLoader antLoader = (AntClassLoader) loader;
String[] pathElm = antLoader.getClasspath().split(File.pathSeparator, -1);
List<String> classpath = configuration.getClasspath();
/*
Expand Down