2006-04-28 Sven de Marothy <[EMAIL PROTECTED]>
* java/awt/image/ReplicateScaleFilter.java: Fix comment.
* javax/swing/ProgressMonitor.java (actionPerformed):
Avoid divide-by-zero.
Index: java/awt/image/ReplicateScaleFilter.java
===================================================================
RCS file: /sources/classpath/classpath/java/awt/image/ReplicateScaleFilter.java,v
retrieving revision 1.9
diff -U3 -r1.9 ReplicateScaleFilter.java
--- java/awt/image/ReplicateScaleFilter.java 21 Aug 2005 03:11:23 -0000 1.9
+++ java/awt/image/ReplicateScaleFilter.java 28 Apr 2006 17:36:25 -0000
@@ -46,7 +46,6 @@
* exact method is not defined by Sun but some sort of fast Box filter should
* probably be correct.
* <br>
- * Currently this filter does nothing and needs to be implemented.
*
* @author C. Brian Jones ([EMAIL PROTECTED])
*/
Index: javax/swing/ProgressMonitor.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/ProgressMonitor.java,v
retrieving revision 1.6
diff -U3 -r1.6 ProgressMonitor.java
--- javax/swing/ProgressMonitor.java 8 Mar 2006 16:46:09 -0000 1.6
+++ javax/swing/ProgressMonitor.java 28 Apr 2006 17:36:29 -0000
@@ -398,7 +398,11 @@
if (( now - timestamp ) > millisToDecideToPopup )
{
first = false;
- long expected = ( now - timestamp ) * ( max - min ) / ( progress - min );
+
+
+ long expected = ( progress - min == 0 ) ?
+ ( now - timestamp ) * ( max - min ) :
+ ( now - timestamp ) * ( max - min ) / ( progress - min );
if ( expected > millisToPopup )
{