Commit 358ad0df authored by Phillip Webb's avatar Phillip Webb

Log stacktrace on additional metadata merge fail

See gh-2288
parent 978cf8c2
......@@ -22,6 +22,8 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
......@@ -367,10 +369,17 @@ public class ConfigurationMetadataAnnotationProcessor extends AbstractProcessor
}
catch (Exception ex) {
logWarning("Unable to merge additional-spring-configuration-metadata.json");
logWarning(getStackTrace(ex));
return metadata;
}
}
private String getStackTrace(Exception ex) {
StringWriter writer = new StringWriter();
ex.printStackTrace(new PrintWriter(writer, true));
return writer.toString();
}
private InputStream getAdditionalMetadata() throws IOException {
// Most build systems will have copied the file to the class output location
FileObject fileObject = this.processingEnv.getFiler().createResource(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment