From c1d139babd9543f7b9f8a0320ee18605884da603 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Fri, 2 Jul 2010 20:01:42 +0000 Subject: [PATCH] Fix generics warnings git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@960094 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hwpf/model/PAPBinTable.java | 22 +++++++++---------- .../poi/hwpf/model/PAPFormattedDiskPage.java | 14 ++++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java index 9c24e48b81..06b6d3f6af 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java @@ -36,7 +36,7 @@ import org.apache.poi.util.LittleEndian; */ public final class PAPBinTable { - protected ArrayList _paragraphs = new ArrayList(); + protected ArrayList _paragraphs = new ArrayList(); byte[] _dataStream; /** So we can know if things are unicode or not */ @@ -89,7 +89,7 @@ public final class PAPBinTable } else { - PAPX currentPap = (PAPX)_paragraphs.get(listIndex); + PAPX currentPap = _paragraphs.get(listIndex); if (currentPap != null && currentPap.getStart() < cpStart) { SprmBuffer clonedBuf = null; @@ -131,33 +131,33 @@ public final class PAPBinTable int endMark = offset + length; int endIndex = listIndex; - PAPX papx = (PAPX)_paragraphs.get(endIndex); + PAPX papx = _paragraphs.get(endIndex); while (papx.getEnd() < endMark) { - papx = (PAPX)_paragraphs.get(++endIndex); + papx = _paragraphs.get(++endIndex); } if (listIndex == endIndex) { - papx = (PAPX)_paragraphs.get(endIndex); + papx = _paragraphs.get(endIndex); papx.setEnd((papx.getEnd() - endMark) + offset); } else { - papx = (PAPX)_paragraphs.get(listIndex); + papx = _paragraphs.get(listIndex); papx.setEnd(offset); for (int x = listIndex + 1; x < endIndex; x++) { - papx = (PAPX)_paragraphs.get(x); + papx = _paragraphs.get(x); papx.setStart(offset); papx.setEnd(offset); } - papx = (PAPX)_paragraphs.get(endIndex); + papx = _paragraphs.get(endIndex); papx.setEnd((papx.getEnd() - endMark) + offset); } for (int x = endIndex + 1; x < size; x++) { - papx = (PAPX)_paragraphs.get(x); + papx = _paragraphs.get(x); papx.setStart(papx.getStart() - length); papx.setEnd(papx.getEnd() - length); } @@ -179,7 +179,7 @@ public final class PAPBinTable } - public ArrayList getParagraphs() + public ArrayList getParagraphs() { return _paragraphs; } @@ -211,7 +211,7 @@ public final class PAPBinTable endingFc += fcMin; - ArrayList overflow = _paragraphs; + ArrayList overflow = _paragraphs; do { PropertyNode startingProp = (PropertyNode)overflow.get(0); diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java b/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java index 8d0b6854b6..965e328051 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/PAPFormattedDiskPage.java @@ -44,8 +44,8 @@ public final class PAPFormattedDiskPage extends FormattedDiskPage { private static final int BX_SIZE = 13; private static final int FC_SIZE = 4; - private ArrayList _papxList = new ArrayList(); - private ArrayList _overFlow; + private ArrayList _papxList = new ArrayList(); + private ArrayList _overFlow; private byte[] _dataStream; @@ -74,7 +74,7 @@ public final class PAPFormattedDiskPage extends FormattedDiskPage { * * @param filler a List of PAPXs */ - public void fill(List filler) + public void fill(List filler) { _papxList.addAll(filler); } @@ -91,7 +91,7 @@ public final class PAPFormattedDiskPage extends FormattedDiskPage { * * @return The remaining PAPXs that didn't fit into this FKP. */ - ArrayList getOverflow() + ArrayList getOverflow() { return _overFlow; } @@ -103,7 +103,7 @@ public final class PAPFormattedDiskPage extends FormattedDiskPage { */ public PAPX getPAPX(int index) { - return (PAPX)_papxList.get(index); + return _papxList.get(index); } /** @@ -198,7 +198,7 @@ public final class PAPFormattedDiskPage extends FormattedDiskPage { // see if we couldn't fit some if (index != size) { - _overFlow = new ArrayList(); + _overFlow = new ArrayList(); _overFlow.addAll(_papxList.subList(index, size)); } @@ -212,7 +212,7 @@ public final class PAPFormattedDiskPage extends FormattedDiskPage { lastGrpprl = new byte[0]; for (int x = 0; x < index; x++) { - papx = (PAPX)_papxList.get(x); + papx = _papxList.get(x); byte[] phe = papx.getParagraphHeight().toByteArray(); byte[] grpprl = papx.getGrpprl(); -- 2.39.5