diff options
author | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2014-03-15 00:25:37 +0100 |
---|---|---|
committer | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2014-04-03 15:38:37 +0200 |
commit | 82f28cc18b9371c81f3e6fa147080371a00443f5 (patch) | |
tree | 9f6e9f65dbe1b930d90d01ba09ae438cac2a0bd2 /pdf-as-lib/src/test/java/at/gv/egiz | |
parent | 0f8777952974daf03099bf48c6db1d91bd431bb2 (diff) | |
download | pdf-as-4-82f28cc18b9371c81f3e6fa147080371a00443f5.tar.gz pdf-as-4-82f28cc18b9371c81f3e6fa147080371a00443f5.tar.bz2 pdf-as-4-82f28cc18b9371c81f3e6fa147080371a00443f5.zip |
Don't use raw types! Also check casts where possible
Diffstat (limited to 'pdf-as-lib/src/test/java/at/gv/egiz')
-rw-r--r-- | pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/TestPDFBoxTable.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/TestPDFBoxTable.java b/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/TestPDFBoxTable.java index b14565c0..2c4ea18d 100644 --- a/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/TestPDFBoxTable.java +++ b/pdf-as-lib/src/test/java/at/gv/egiz/pdfas/lib/test/mains/TestPDFBoxTable.java @@ -90,9 +90,9 @@ public class TestPDFBoxTable { float textx = x+cellMargin; float texty = y-15; for(int i = 0; i < abstractTable.getRows().size(); i++){ - ArrayList row = (ArrayList) abstractTable.getRows().get(i); + ArrayList<Entry> row = abstractTable.getRows().get(i); for(int j = 0 ; j < row.size(); j++) { - Entry cell = (Entry) row.get(j); + Entry cell = row.get(j); String text = cell.toString(); text = "Hallo"; COSName name = COSName.getPDFName("ANDI_TAG!"); @@ -125,16 +125,15 @@ public class TestPDFBoxTable { private static void renderTable(Table abstractTable) { - ArrayList rows = abstractTable.getRows(); + ArrayList<ArrayList<Entry>> rows = abstractTable.getRows(); Style table_style = abstractTable.getStyle(); for (int row_idx = 0; row_idx < rows.size(); row_idx++) { - @SuppressWarnings("rawtypes") - ArrayList row = (ArrayList) rows.get(row_idx); + ArrayList<Entry> row = rows.get(row_idx); logger.info("## Row:" + row_idx + " ## of table:" + abstractTable.getName()); for (int entry_idx = 0; entry_idx < row.size(); entry_idx++) { - Entry cell = (Entry) row.get(entry_idx); + Entry cell = row.get(entry_idx); // 03.11.2010 changed by exthex - swapped the two params, was probably a bug Style inherit_style = Style.doInherit(table_style, cell.getStyle()); cell.setStyle(inherit_style); |