poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1674965 - /poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java
Date Mon, 20 Apr 2015 19:17:24 GMT
Author: centic
Date: Mon Apr 20 19:17:24 2015
New Revision: 1674965

URL: http://svn.apache.org/r1674965
Log:
Fix some Eclipse warnings

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java?rev=1674965&r1=1674964&r2=1674965&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java Mon Apr 20
19:17:24 2015
@@ -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);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message