harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r496046 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/plaf/basic/BasicProgressBarUI.java test/api/java/common/javax/swing/plaf/basic/BasicProgressBarUITest.java
Date Sun, 14 Jan 2007 09:29:55 GMT
Author: hindessm
Date: Sun Jan 14 01:29:54 2007
New Revision: 496046

URL: http://svn.apache.org/viewvc?view=rev&rev=496046
Log:
Applying patches from "[#HARMONY-2677] [classlib][swing]
javax.swing.plaf.basic.BasicProgressBarUI.startAnimationTimer() throws
unspecified  NPE while RI does not".

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

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicProgressBarUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicProgressBarUI.java?view=diff&rev=496046&r1=496045&r2=496046
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicProgressBarUI.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicProgressBarUI.java
Sun Jan 14 01:29:54 2007
@@ -208,11 +208,15 @@
     }
 
     protected void startAnimationTimer() {
-        animationTimer.start();
+        if (animationTimer != null) {
+            animationTimer.start();
+        }
     }
 
     protected void stopAnimationTimer() {
-        animationTimer.stop();
+        if (animationTimer != null) {
+            animationTimer.stop();
+        }
     }
 
     protected Dimension getPreferredInnerHorizontal() {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicProgressBarUITest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicProgressBarUITest.java?view=diff&rev=496046&r1=496045&r2=496046
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicProgressBarUITest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicProgressBarUITest.java
Sun Jan 14 01:29:54 2007
@@ -133,4 +133,22 @@
         progressBar.setIndeterminate(true);
         assertEquals(0, ui.getAnimationIndex());
     }
+
+    public void testStartStop() throws NullPointerException {
+        BasicProgressBarUIExt pb = new BasicProgressBarUIExt();
+        pb.startAnimationTimer(); 
+
+        pb = new BasicProgressBarUIExt();
+        pb.stopAnimationTimer(); 
+    }
+    
+    class BasicProgressBarUIExt extends BasicProgressBarUI {
+        public void startAnimationTimer() {
+            super.startAnimationTimer();
+        }
+        
+        public void stopAnimationTimer() {
+            super.stopAnimationTimer();
+        }
+    }
 }



Mime
View raw message