harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r495931 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
Date Sat, 13 Jan 2007 17:34:43 GMT
Author: hindessm
Date: Sat Jan 13 09:34:39 2007
New Revision: 495931

URL: http://svn.apache.org/viewvc?view=rev&rev=495931
Log:
Applying patch from "[#HARMONY-2598] [classlib][awt]
java.awt.Graphics2D.drawLine throws NPE if color is set to null".  I
modified the test slightly to let junit handle the exceptions.

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java?view=diff&rev=495931&r1=495930&r2=495931
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
Sat Jan 13 09:34:39 2007
@@ -130,9 +130,9 @@
     // Clipping things
     protected MultiRectArea clip = null;
 
-    protected Paint paint = Color.BLACK;
-    protected Color fgColor = Color.BLACK;
-    protected Color bgColor = Color.WHITE;
+    protected Paint paint = Color.WHITE;
+    protected Color fgColor = Color.WHITE;
+    protected Color bgColor = Color.BLACK;
 
     protected Composite composite = AlphaComposite.SrcOver;
 
@@ -978,8 +978,10 @@
 
     @Override
     public void setColor(Color color) {
-        fgColor = color;
-        paint = color;
+        if (color != null) {
+            fgColor = color;
+            paint = color;
+        }
     }
 
     @Override



Mime
View raw message