harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r495986 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/plaf/basic/BasicButtonListener.java test/api/java/common/javax/swing/plaf/basic/BasicButtonListenerTest.java
Date Sat, 13 Jan 2007 22:33:34 GMT
Author: hindessm
Date: Sat Jan 13 14:33:33 2007
New Revision: 495986

URL: http://svn.apache.org/viewvc?view=rev&rev=495986
Log:
Applying patch from "[#HARMONY-2640] [classlib][swing]
javax.swing.plaf.basic.BasicButtonListener.propertyChange(null) does not
throw unspecified NPE".

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

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicButtonListener.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicButtonListener.java?view=diff&rev=495986&r1=495985&r2=495986
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicButtonListener.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicButtonListener.java
Sat Jan 13 14:33:33 2007
@@ -101,9 +101,10 @@
     }
 
     public void propertyChange(final PropertyChangeEvent event) {
-        if (event != null && AbstractButton.CONTENT_AREA_FILLED_CHANGED_PROPERTY.equals(event.getPropertyName()))
{
+        if (AbstractButton.CONTENT_AREA_FILLED_CHANGED_PROPERTY.equals(event.getPropertyName()))
{
             LookAndFeel.installProperty(button, StringConstants.OPAQUE_PROPERTY, event.getNewValue());
         }
+
         button.revalidate();
         button.repaint();
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonListenerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonListenerTest.java?view=diff&rev=495986&r1=495985&r2=495986
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonListenerTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicButtonListenerTest.java
Sat Jan 13 14:33:33 2007
@@ -71,7 +71,14 @@
     }
 
     public void testPropertyChange() {
-        //TODO Implement propertyChange().
+        try {         
+            javax.swing.plaf.basic.BasicButtonListener l = 
+            new javax.swing.plaf.basic.BasicButtonListener(new JButton()); 
+            l.propertyChange(null); 
+            fail("NPE should be thrown");
+        } catch (NullPointerException npe) {    
+            // PASSED          
+        }
     }
 
     public void testMouseReleased() {



Mime
View raw message