diff options
Diffstat (limited to 'src/java/org/apache/poi/hssf/usermodel')
8 files changed, 9 insertions, 11 deletions
diff --git a/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java b/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java index 42debc6d81..beadac4646 100644 --- a/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java +++ b/src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java @@ -42,7 +42,7 @@ public class DummyGraphics2d g2D = (Graphics2D)img.getGraphics();
}
- public void addRenderingHints(Map hints)
+ public void addRenderingHints(Map<?,?> hints)
{
System.out.println( "addRenderingHinds(Map):" );
System.out.println( " hints = " + hints );
@@ -275,7 +275,7 @@ public class DummyGraphics2d g2D.setRenderingHint( hintKey, hintValue );
}
- public void setRenderingHints(Map hints)
+ public void setRenderingHints(Map<?,?> hints)
{
System.out.println( "setRenderingHints(Map):" );
System.out.println( "hints = " + hints );
diff --git a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java index 4293587b38..1f31e80bd6 100644 --- a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java +++ b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java @@ -431,7 +431,6 @@ public class EscherGraphics return null; } - @SuppressWarnings("deprecation") public Rectangle getClipRect() { return getClipBounds(); diff --git a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java index 45306e89f0..949168aac1 100644 --- a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java +++ b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java @@ -89,7 +89,7 @@ public final class EscherGraphics2d extends Graphics2D { setColor(Color.black); } - public void addRenderingHints(Map map) + public void addRenderingHints(Map<?, ?> map) { getG2D().addRenderingHints(map); } @@ -514,7 +514,7 @@ public final class EscherGraphics2d extends Graphics2D { getG2D().setRenderingHint(key, obj); } - public void setRenderingHints(Map map) + public void setRenderingHints(Map<?, ?> map) { getG2D().setRenderingHints(map); } diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java b/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java index dc2a217330..b1cb174a99 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java @@ -63,7 +63,6 @@ public final class HSSFDataFormat implements DataFormat { HSSFDataFormat(InternalWorkbook workbook) { _workbook = workbook; - @SuppressWarnings("unchecked") Iterator<FormatRecord> i = workbook.getFormats().iterator(); while (i.hasNext()) { FormatRecord r = i.next(); diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java b/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java index 73b402facd..aed0c513fd 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java @@ -309,7 +309,7 @@ public final class HSSFFont implements Font { { byte charset = font.getCharset(); if(charset >= 0) { - return (int)charset; + return charset; } else { return charset + 256; } diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFPalette.java b/src/java/org/apache/poi/hssf/usermodel/HSSFPalette.java index 96ab009748..6ac5368402 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFPalette.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFPalette.java @@ -134,7 +134,7 @@ public final class HSSFPalette { * 0 and 255, so distance calculations work as expected. */ private int unsignedInt(byte b) { - return 0xFF & ((int) b); + return 0xFF & b; } /** diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java b/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java index 67315f12af..5b4a17ec85 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java @@ -617,7 +617,7 @@ public final class HSSFRow implements Row { * Alias for {@link #cellIterator} to allow * foreach loops */ - public Iterator iterator() { + public Iterator<Cell> iterator() { return cellIterator(); } diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java b/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java index 004b2f4606..66440005b2 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFShapeGroup.java @@ -305,8 +305,8 @@ public class HSSFShapeGroup extends HSSFShape implements HSSFShapeContainer { */ public int countOfAllChildren() { int count = shapes.size(); - for (Iterator iterator = shapes.iterator(); iterator.hasNext(); ) { - HSSFShape shape = (HSSFShape) iterator.next(); + for (Iterator<HSSFShape> iterator = shapes.iterator(); iterator.hasNext(); ) { + HSSFShape shape = iterator.next(); count += shape.countOfAllChildren(); } return count; |