Skip to content

Commit

Permalink
[encoding] Use standard charset/standardstarset instead of system to …
Browse files Browse the repository at this point in the history
…work with encoding
  • Loading branch information
hazendaz committed Nov 11, 2024
1 parent 028a1a3 commit 68ea127
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {

BufferedWriter writer = Files.newBufferedWriter(outputFile.toPath(), effectiveEncoding)

if (effectiveEncoding.name().equalsIgnoreCase("Cp1252")) {
if (effectiveEncoding == StandardCharset.CP1252) {
writer.write '<?xml version="1.0" encoding="windows-1252"?>'
} else {
writer.write '<?xml version="1.0" encoding="' + effectiveEncoding.name().toLowerCase(Locale.ENGLISH) + '"?>'
Expand Down

0 comments on commit 68ea127

Please sign in to comment.