harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r446592 - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src: main/java/common/java/awt/Toolkit.java test/api/java/common/java/awt/ToolkitRTest.java
Date Fri, 15 Sep 2006 12:28:14 GMT
Author: hindessm
Date: Fri Sep 15 05:28:13 2006
New Revision: 446592

URL: http://svn.apache.org/viewvc?view=rev&rev=446592
Log:
Applied patches from "[#HARMONY-1339] java.awt.Toolkit.getScreenInsets()
always returns null".

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ToolkitRTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java?view=diff&rev=446592&r1=446591&r2=446592
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/java/awt/Toolkit.java
Fri Sep 15 05:28:13 2006
@@ -825,7 +825,7 @@
         }
         lockAWT();
         try {
-            return null;
+            return new Insets(0, 0, 0, 0); //TODO: get real screen insets
         } finally {
             unlockAWT();
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ToolkitRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ToolkitRTest.java?view=diff&rev=446592&r1=446591&r2=446592
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ToolkitRTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ToolkitRTest.java
Fri Sep 15 05:28:13 2006
@@ -23,6 +23,14 @@
 
 public class ToolkitRTest extends TestCase {
 
+    public void testGetScreenInsets() {
+        // regression test HARMONY-1339
+        Toolkit tlk = Toolkit.getDefaultToolkit();
+        GraphicsConfiguration gc = new Frame().getGraphicsConfiguration();
+        Insets screenInsets = tlk.getScreenInsets(gc);
+        assertNotNull("screen insets are not null", screenInsets);
+    }
+
     public void testGetScreenInsetsNull() {
         boolean npe = false;
         Toolkit tlk = Toolkit.getDefaultToolkit();



Mime
View raw message