Fix generics warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@960094 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2010-07-02 20:01:42 +00:00
parent 71048002e4
commit 01ec911b74
2 changed files with 18 additions and 18 deletions

View File

@ -36,7 +36,7 @@ import org.apache.poi.util.LittleEndian;
*/
public final class PAPBinTable
{
protected ArrayList _paragraphs = new ArrayList();
protected ArrayList<PAPX> _paragraphs = new ArrayList<PAPX>();
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<PAPX> getParagraphs()
{
return _paragraphs;
}
@ -211,7 +211,7 @@ public final class PAPBinTable
endingFc += fcMin;
ArrayList overflow = _paragraphs;
ArrayList<PAPX> overflow = _paragraphs;
do
{
PropertyNode startingProp = (PropertyNode)overflow.get(0);

View File

@ -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<PAPX> _papxList = new ArrayList<PAPX>();
private ArrayList<PAPX> _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<PAPX> 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<PAPX> 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<PAPX>();
_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();