diff options
Diffstat (limited to 'fop-sandbox')
4 files changed, 10 insertions, 13 deletions
diff --git a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java index 93f7c1d8d..08a1b664f 100644 --- a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java +++ b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java @@ -22,6 +22,7 @@ package org.apache.fop.render.mif; // Java import java.io.IOException; import java.io.OutputStream; +import java.nio.charset.StandardCharsets; import java.util.Iterator; import java.util.List; @@ -89,9 +90,9 @@ public class MIFElement { } String indentStr = sb.toString(); if (!started) { - os.write((indentStr + "<" + name).getBytes()); + os.write((indentStr + "<" + name).getBytes(StandardCharsets.UTF_8)); if (valueElements != null) { - os.write(("\n").getBytes()); + os.write(("\n").getBytes(StandardCharsets.UTF_8)); } started = true; } @@ -110,9 +111,9 @@ public class MIFElement { if (!finish || !done) { return false; } - os.write((indentStr + "> # end of " + name + "\n").getBytes()); + os.write((indentStr + "> # end of " + name + "\n").getBytes(StandardCharsets.UTF_8)); } else { - os.write((" " + valueStr + ">\n").getBytes()); + os.write((" " + valueStr + ">\n").getBytes(StandardCharsets.UTF_8)); } finished = true; return true; diff --git a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java index c727b2998..1a2b3e599 100644 --- a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java +++ b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java @@ -22,6 +22,7 @@ package org.apache.fop.render.mif; // Java import java.io.IOException; import java.io.OutputStream; +import java.nio.charset.StandardCharsets; import java.util.Iterator; import java.util.List; @@ -130,7 +131,7 @@ public class MIFFile extends MIFElement { } if (!started) { - os.write(("<MIFFile 5.00> # Generated by FOP\n"/* + getVersion()*/).getBytes()); + os.write(("<MIFFile 5.00> # Generated by FOP\n"/* + getVersion()*/).getBytes(StandardCharsets.UTF_8)); started = true; } boolean done = true; @@ -146,7 +147,7 @@ public class MIFFile extends MIFElement { } } if (done && finish) { - os.write(("# end of MIFFile").getBytes()); + os.write(("# end of MIFFile").getBytes(StandardCharsets.UTF_8)); } } diff --git a/fop-sandbox/src/main/java/org/apache/fop/render/svg/SVGRenderer.java b/fop-sandbox/src/main/java/org/apache/fop/render/svg/SVGRenderer.java index 9cbc1662d..9800eb766 100644 --- a/fop-sandbox/src/main/java/org/apache/fop/render/svg/SVGRenderer.java +++ b/fop-sandbox/src/main/java/org/apache/fop/render/svg/SVGRenderer.java @@ -25,6 +25,7 @@ import java.awt.geom.Rectangle2D; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; +import java.nio.charset.StandardCharsets; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document; @@ -148,7 +149,7 @@ public class SVGRenderer extends Java2DRenderer { return; } try { - Writer writer = new java.io.OutputStreamWriter(out, "UTF-8"); + Writer writer = new java.io.OutputStreamWriter(out, StandardCharsets.UTF_8.name()); this.svgGenerator.stream(writer, useCSS); } finally { if (out != this.firstOutputStream) { diff --git a/fop-sandbox/src/tools/resources/findbugs/exclusions.xml b/fop-sandbox/src/tools/resources/findbugs/exclusions.xml index 325065e13..a7a45b4cd 100644 --- a/fop-sandbox/src/tools/resources/findbugs/exclusions.xml +++ b/fop-sandbox/src/tools/resources/findbugs/exclusions.xml @@ -73,12 +73,6 @@ <Bug pattern="DM_CONVERT_CASE"/> </Match> <Match> - <Bug pattern="DM_FP_NUMBER_CTOR"/> - </Match> - <Match> - <Bug pattern="DM_NUMBER_CTOR"/> - </Match> - <Match> <Bug pattern="EI_EXPOSE_REP2"/> </Match> <Match> |