]> source.dussan.org Git - poi.git/commitdiff
Fix some Eclipse warnings
authorDominik Stadler <centic@apache.org>
Mon, 20 Apr 2015 19:17:24 +0000 (19:17 +0000)
committerDominik Stadler <centic@apache.org>
Mon, 20 Apr 2015 19:17:24 +0000 (19:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1674965 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java

index e3804413ac7c77ef762ad83b1326088ed5e32cbd..a1280568258bb17c8671a4283aa9b842c90e3ccb 100644 (file)
@@ -167,6 +167,7 @@ class RenderableShape {
         return paint;\r
     }\r
 \r
+    @SuppressWarnings("unchecked")\r
     private Paint createLinearGradientPaint(\r
             Graphics2D graphics,\r
             CTGradientFillProperties gradFill, Rectangle2D anchor,\r
@@ -224,10 +225,12 @@ class RenderableShape {
         // Trick to return GradientPaint on JDK 1.5 and LinearGradientPaint on JDK 1.6+\r
         Paint paint;\r
         try {\r
-            Class clz = Class.forName("java.awt.LinearGradientPaint");\r
-            Class clzCycleMethod = Class.forName("java.awt.MultipleGradientPaint$CycleMethod");\r
-            Class clzColorSpaceType = Class.forName("java.awt.MultipleGradientPaint$ColorSpaceType");\r
-            Constructor c =\r
+            Class<?> clz = Class.forName("java.awt.LinearGradientPaint");\r
+            @SuppressWarnings("rawtypes")\r
+                       Class clzCycleMethod = Class.forName("java.awt.MultipleGradientPaint$CycleMethod");\r
+            @SuppressWarnings("rawtypes")\r
+                       Class clzColorSpaceType = Class.forName("java.awt.MultipleGradientPaint$ColorSpaceType");\r
+            Constructor<?> c =\r
                     clz.getConstructor(Point2D.class, Point2D.class, float[].class, Color[].class,\r
                             clzCycleMethod, clzColorSpaceType, AffineTransform.class);\r
             paint = (Paint) c.newInstance(p1, p2, fractions, colors,\r
@@ -298,8 +301,8 @@ class RenderableShape {
         // Trick to return GradientPaint on JDK 1.5 and RadialGradientPaint on JDK 1.6+\r
         Paint paint;\r
         try {\r
-            Class clz = Class.forName("java.awt.RadialGradientPaint");\r
-            Constructor c =\r
+            Class<?> clz = Class.forName("java.awt.RadialGradientPaint");\r
+            Constructor<?> c =\r
                     clz.getConstructor(Point2D.class, float.class,\r
                             float[].class, Color[].class);\r
             paint = (Paint) c.newInstance(pCenter, radius, fractions, colors);\r