From 5ffed6bca11f3fee3fa9fc651a4ae0f239464087 Mon Sep 17 00:00:00 2001 From: Osmar Rodrigues dos Santos Junior Date: Mon, 30 Sep 2019 15:25:51 -0300 Subject: [PATCH 1/2] Adding the xml declaration with the effective encoding --- .../groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy index d62c3b89..6ee76ea8 100644 --- a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy +++ b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy @@ -1134,7 +1134,10 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait { outputFile.createNewFile() def writer = outputFile.newWriter(effectiveEncoding) - writer.write "\n" + + writer.write "" + + writer.write "\n" writer << xmlBuilder.bind { mkp.yield path } } else { From c91a813ace88451c713046234fd0ed0736c52800 Mon Sep 17 00:00:00 2001 From: Osmar Rodrigues dos Santos Junior Date: Mon, 30 Sep 2019 15:31:06 -0300 Subject: [PATCH 2/2] Formating source --- .../groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy index 6ee76ea8..0e0536a1 100644 --- a/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy +++ b/src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy @@ -1135,9 +1135,9 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait { def writer = outputFile.newWriter(effectiveEncoding) - writer.write "" + writer.write "" - writer.write "\n" + writer.write "\n" writer << xmlBuilder.bind { mkp.yield path } } else {