@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\" "
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);
int[] aa = new int [ substitutes.size() ];
int i = 0;
for (Integer a : substitutes) {
- aa[i++] = (int) a;
+ aa[i++] = a;
}
clearSubstitutes();
return aa;
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;
}
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;
}
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;
}
}
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;
}