jdk/test/sun/java2d/ClassCastExceptionForInvalidSurface.java
changeset 39028 0b738aef65d0
parent 39013 d6a023d500ef
child 40128 e635645d2a8a
--- a/jdk/test/sun/java2d/ClassCastExceptionForInvalidSurface.java	Fri Jun 03 12:27:06 2016 +0530
+++ b/jdk/test/sun/java2d/ClassCastExceptionForInvalidSurface.java	Mon Jun 06 16:23:37 2016 +0300
@@ -22,10 +22,12 @@
  */
 
 import java.awt.Font;
+import java.awt.Graphics2D;
 import java.awt.GraphicsConfiguration;
 import java.awt.GraphicsEnvironment;
 import java.awt.Image;
 import java.awt.Rectangle;
+import java.awt.RenderingHints;
 import java.awt.font.FontRenderContext;
 import java.awt.font.GlyphVector;
 import java.awt.image.BufferedImage;
@@ -99,6 +101,11 @@
                 vi.createGraphics().drawString("123", 1, 1);
                 vi.createGraphics().draw(new Rectangle(0, 0, 10, 10));
                 vi.createGraphics().fillOval(0, 0, 10, 10);
+                final Graphics2D graphics = vi.createGraphics();
+                graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+                                          RenderingHints.VALUE_ANTIALIAS_ON);
+                graphics.fillPolygon(new int[] {0, 10, 10, 0},
+                                     new int [] {0, 0, 10, 10}, 4);
             }
         });
         t1.start();