diff options
author | Simon Steiner <ssteiner@apache.org> | 2022-06-15 09:35:11 +0000 |
---|---|---|
committer | Simon Steiner <ssteiner@apache.org> | 2022-06-15 09:35:11 +0000 |
commit | 0cce4a4a66e147176c817ca8deb5099e76d49a12 (patch) | |
tree | d99ac891f776721ecc6ac352528de3a39bbcb11a /fop-core | |
parent | 8ac86aa2513dc26a0691ce228dbba17c6c9cd080 (diff) | |
download | xmlgraphics-fop-0cce4a4a66e147176c817ca8deb5099e76d49a12.tar.gz xmlgraphics-fop-0cce4a4a66e147176c817ca8deb5099e76d49a12.zip |
Fix warnings
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1901933 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'fop-core')
4 files changed, 11 insertions, 11 deletions
diff --git a/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java b/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java index d00526b10..4b933e98d 100644 --- a/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/accessibility/fo/FO2StructureTreeConverterTestCase.java @@ -183,7 +183,7 @@ public class FO2StructureTreeConverterTestCase { @Test public void testRemoveTableHeader() throws Exception { keepEmptyTags = false; - String fo = IOUtils.toString(getResource("table-artifact.fo")).replace("role=\"artifact\"", ""); + String fo = IOUtils.toString(getResource("table-artifact.fo"), "utf8").replace("role=\"artifact\"", ""); compare(fo, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<structure-tree-sequence>\n" + "<structure-tree xmlns=\"http://xmlgraphics.apache.org/fop/intermediate\" " diff --git a/fop-core/src/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java b/fop-core/src/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java index 9e4b54f4b..524cc8933 100644 --- a/fop-core/src/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java +++ b/fop-core/src/test/java/org/apache/fop/complexscripts/fonts/ttx/TTXFile.java @@ -355,7 +355,7 @@ public class TTXFile { public static synchronized TTXFile getFromCache(String filename) { assert cache != null; TTXFile f; - if ((f = (TTXFile) cache.get(filename)) == null) { + if ((f = cache.get(filename)) == null) { f = new TTXFile(); f.parse(filename); cache.put(filename, f); @@ -3002,7 +3002,7 @@ public class TTXFile { int[] aa = new int [ substitutes.size() ]; int i = 0; for (Integer a : substitutes) { - aa[i++] = (int) a; + aa[i++] = a; } clearSubstitutes(); return aa; @@ -3024,7 +3024,7 @@ public class TTXFile { return entries; } private RuleLookup[] extractRuleLookups() { - RuleLookup[] lookups = (RuleLookup[]) ruleLookups.toArray(new RuleLookup [ ruleLookups.size() ]); + RuleLookup[] lookups = ruleLookups.toArray(new RuleLookup [ ruleLookups.size() ]); clearRuleLookups(); return lookups; } @@ -3080,7 +3080,7 @@ public class TTXFile { psIndex = -1; } private PairValues[] extractPairs() { - PairValues[] pva = (PairValues[]) pairs.toArray(new PairValues [ pairs.size() ]); + PairValues[] pva = pairs.toArray(new PairValues [ pairs.size() ]); clearPairs(); return pva; } @@ -3091,18 +3091,18 @@ public class TTXFile { pairSets.clear(); } private PairValues[][] extractPairSets() { - PairValues[][] pvm = (PairValues[][]) pairSets.toArray(new PairValues [ pairSets.size() ][]); + PairValues[][] pvm = pairSets.toArray(new PairValues [ pairSets.size() ][]); clearPairSets(); return pvm; } private Anchor[] extractAnchors() { - Anchor[] aa = (Anchor[]) anchors.toArray(new Anchor [ anchors.size() ]); + Anchor[] aa = anchors.toArray(new Anchor [ anchors.size() ]); anchors.clear(); return aa; } private MarkAnchor[] extractMarkAnchors() { MarkAnchor[] maa = new MarkAnchor [ markAnchors.size() ]; - maa = (MarkAnchor[]) markAnchors.toArray(new MarkAnchor [ maa.length ]); + maa = markAnchors.toArray(new MarkAnchor [ maa.length ]); markAnchors.clear(); return maa; } @@ -3145,7 +3145,7 @@ public class TTXFile { } private Anchor[][] extractComponents() { Anchor[][] cam = new Anchor [ components.size() ][]; - cam = (Anchor[][]) components.toArray(new Anchor [ cam.length ][]); + cam = components.toArray(new Anchor [ cam.length ][]); components.clear(); return cam; } diff --git a/fop-core/src/test/java/org/apache/fop/layoutengine/LayoutEngineTestUtils.java b/fop-core/src/test/java/org/apache/fop/layoutengine/LayoutEngineTestUtils.java index 2649838f4..58cdbcfc9 100644 --- a/fop-core/src/test/java/org/apache/fop/layoutengine/LayoutEngineTestUtils.java +++ b/fop-core/src/test/java/org/apache/fop/layoutengine/LayoutEngineTestUtils.java @@ -125,7 +125,7 @@ public final class LayoutEngineTestUtils { } catch (TransformerException te) { throw new RuntimeException(te); } - return (String[]) lines.toArray(new String[lines.size()]); + return lines.toArray(new String[lines.size()]); } /** diff --git a/fop-core/src/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java b/fop-core/src/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java index 8e23195cb..93a6480c1 100644 --- a/fop-core/src/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java +++ b/fop-core/src/test/java/org/apache/fop/render/intermediate/IFStructureTreeBuilderTestCase.java @@ -156,7 +156,7 @@ public class IFStructureTreeBuilderTestCase { } public boolean matches(Attributes attributes) { - return attributesEqual(expected, (Attributes) attributes); + return attributesEqual(expected, attributes); } private static boolean attributesEqual(Attributes attributes1, Attributes attributes2) { |