harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r501046 - in /harmony/enhanced/classlib/trunk/modules/awt/src: main/java/common/java/awt/Container.java test/api/java/common/java/awt/ContainerRTest.java
Date Mon, 29 Jan 2007 13:39:32 GMT
Author: ayza
Date: Mon Jan 29 05:39:32 2007
New Revision: 501046

URL: http://svn.apache.org/viewvc?view=rev&rev=501046
Log:
Applying the patch from HARMONY-2527 ([classlib][awt]Component.paint method should check if
passed parameter is null)

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Container.java
    harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerRTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Container.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Container.java?view=diff&rev=501046&r1=501045&r2=501046
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Container.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Container.java
Mon Jan 29 05:39:32 2007
@@ -987,7 +987,13 @@
     }
 
     private void paintComponentsImpl(Graphics g) {
-        Shape clip = g.getClip();
+        Shape clip;
+        
+        if (g == null) {
+            return;
+        }
+        
+        clip = g.getClip();
 
         for (int i = children.size() - 1; i >= 0; i--) {
             Component comp = children.get(i);

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerRTest.java?view=diff&rev=501046&r1=501045&r2=501046
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerRTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ContainerRTest.java
Mon Jan 29 05:39:32 2007
@@ -58,6 +58,12 @@
         assertTrue(c1.isDisplayable());
         assertTrue(c2.isDisplayable());
     }
+    
+    public final void testPaint() {
+        // Regression test for HARMONY-2527
+        final Component c = new Frame();
+        c.paint(c.getGraphics());
+    }
 
     public void testAddComponent() {
         try {         



Mime
View raw message