Skip to content
Merged
Show file tree
Hide file tree
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 @@ -308,7 +308,7 @@ public void append(final File document) throws IOException {
// for Java just place the license at the front, for XML add
// an XML decl first - don't know how to handle PHP
if (expectsPackage || expectsXMLDecl) {
try (FileWriter writer2 = new FileWriter(newDocument)) {
try (FileWriter writer2 = new FileWriter(newDocument, StandardCharsets.UTF_8)) {
if (expectsXMLDecl) {
writer2.write("<?xml version='1.0'?>");
writer2.write(LINE_SEP);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayDeque;
import java.util.HashSet;
import java.util.Objects;
Expand Down Expand Up @@ -327,7 +328,7 @@ public IXmlWriter append(final Document document) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
transformer.transform(new DOMSource(document),
new StreamResult(baos));
appendable.append(baos.toString());
appendable.append(baos.toString(StandardCharsets.UTF_8));
} catch (TransformerException e) {
throw new IOException(e);
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ agnostic home for software distribution comprehension and audit tools.
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.9.8.3</version>
<version>4.10.2.0</version>
<configuration>
<maxAllowedViolations>46</maxAllowedViolations>
<failOnError>true</failOnError>
Expand Down
3 changes: 3 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ in order to be properly linked in site reports.
</release>
-->
<release version="1.0.0-SNAPSHOT" date="xxxx-yy-zz" description="Current SNAPSHOT - release to be done">
<action issue="RAT-532" type="update" dev="pottlinger" due-to="dependabot">
Update to spotbugs-maven-plugin to 4.10.2.0 and use UTF-8 as fallback encoding in LicenseAppender and XmlWriter.
</action>
<action issue="RAT-558" type="add" dev="pottlinger">
Add a basic security and agents configuration to Apache RAT.
</action>
Expand Down
Loading