aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2015-04-20 19:17:24 +0000
committerDominik Stadler <centic@apache.org>2015-04-20 19:17:24 +0000
commitcdb3f37323ac3b098a0efad9539f9f5f271e1e93 (patch)
treefa4001ab79bceb7d73844021bfe24f8cdfe91da7
parent1c522adc6ba98ba3f6a523e0fac8a133c1dc09d5 (diff)
downloadpoi-cdb3f37323ac3b098a0efad9539f9f5f271e1e93.tar.gz
poi-cdb3f37323ac3b098a0efad9539f9f5f271e1e93.zip
Fix some Eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1674965 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java
index e3804413ac..a128056825 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java
@@ -167,6 +167,7 @@ class RenderableShape {
return paint;
}
+ @SuppressWarnings("unchecked")
private Paint createLinearGradientPaint(
Graphics2D graphics,
CTGradientFillProperties gradFill, Rectangle2D anchor,
@@ -224,10 +225,12 @@ class RenderableShape {
// Trick to return GradientPaint on JDK 1.5 and LinearGradientPaint on JDK 1.6+
Paint paint;
try {
- Class clz = Class.forName("java.awt.LinearGradientPaint");
- Class clzCycleMethod = Class.forName("java.awt.MultipleGradientPaint$CycleMethod");
- Class clzColorSpaceType = Class.forName("java.awt.MultipleGradientPaint$ColorSpaceType");
- Constructor c =
+ Class<?> clz = Class.forName("java.awt.LinearGradientPaint");
+ @SuppressWarnings("rawtypes")
+ Class clzCycleMethod = Class.forName("java.awt.MultipleGradientPaint$CycleMethod");
+ @SuppressWarnings("rawtypes")
+ Class clzColorSpaceType = Class.forName("java.awt.MultipleGradientPaint$ColorSpaceType");
+ Constructor<?> c =
clz.getConstructor(Point2D.class, Point2D.class, float[].class, Color[].class,
clzCycleMethod, clzColorSpaceType, AffineTransform.class);
paint = (Paint) c.newInstance(p1, p2, fractions, colors,
@@ -298,8 +301,8 @@ class RenderableShape {
// Trick to return GradientPaint on JDK 1.5 and RadialGradientPaint on JDK 1.6+
Paint paint;
try {
- Class clz = Class.forName("java.awt.RadialGradientPaint");
- Constructor c =
+ Class<?> clz = Class.forName("java.awt.RadialGradientPaint");
+ Constructor<?> c =
clz.getConstructor(Point2D.class, float.class,
float[].class, Color[].class);
paint = (Paint) c.newInstance(pCenter, radius, fractions, colors);