harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r495948 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/plaf/basic/BasicTableHeaderUI.java test/api/java/common/javax/swing/plaf/basic/BasicTableHeaderUITest.java
Date Sat, 13 Jan 2007 19:12:55 GMT
Author: apetrenko
Date: Sat Jan 13 11:12:54 2007
New Revision: 495948

URL: http://svn.apache.org/viewvc?view=rev&rev=495948
Log:
Patch for HARMONY-1777 "[classlib][swing]javax.swing.plaf.basic.BasicTableHeaderUI.MouseInputHandler.mouseEntered(null)
throws unspecified NPE"

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableHeaderUI.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableHeaderUITest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableHeaderUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableHeaderUI.java?view=diff&rev=495948&r1=495947&r2=495948
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableHeaderUI.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicTableHeaderUI.java
Sat Jan 13 11:12:54 2007
@@ -206,7 +206,7 @@
         }
 
         private void updateCursor(final MouseEvent e) {
-            if (e.getButton() > 0 || e.getModifiersEx() > 0) {
+            if (e == null || e.getButton() > 0 || e.getModifiersEx() > 0) {
                 return;
             }
 

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableHeaderUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableHeaderUITest.java?view=diff&rev=495948&r1=495947&r2=495948
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableHeaderUITest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicTableHeaderUITest.java
Sat Jan 13 11:12:54 2007
@@ -150,4 +150,9 @@
         assertEquals(new Dimension(70, renderingComponent.getPreferredSize().height), ui
                 .getPreferredSize(null));
     }
+
+    public void testMouseInputListener() throws Exception {
+        // Regression test for HARMONY-1777
+        new BasicTableHeaderUI().new MouseInputHandler().mouseEntered(null);
+    }
 }



Mime
View raw message