On Thu, 2006-01-05 at 21:36 +0100, Mark Wielaard wrote:
> Hi Tony,
> > +        Document doc = textComponent.getDocument();
> > +        if (doc != null)
> > +          this.dot = Math.min(dot, doc.getLength());
> > +        this.dot = Math.max(dot, 0);

> There seems to be some confusion here between dot the parameter and
> this.dot. if doc != null you probably want to set the parameter dot to
> Math.min(dot,etc) since you will override this.dot immediately after
> that assignment.

Thanks Mark, this is fixed as follows:

2006-01-05  Anthony Balkissoon  <[EMAIL PROTECTED]>

        * javax/swing/text/DefaultCaret.java:
        (setDot): Fixed paramater to Math.max to be this.dot and not the 
        parameter dot.


RCS
file: /cvsroot/classpath/classpath/javax/swing/text/DefaultCaret.java,v
retrieving revision 1.27
diff -u -r1.27 DefaultCaret.java
--- javax/swing/text/DefaultCaret.java  5 Jan 2006 20:15:34 -0000
1.27
+++ javax/swing/text/DefaultCaret.java  5 Jan 2006 23:53:08 -0000
@@ -833,7 +833,7 @@
         Document doc = textComponent.getDocument();
         if (doc != null)
           this.dot = Math.min(dot, doc.getLength());
-        this.dot = Math.max(dot, 0);
+        this.dot = Math.max(this.dot, 0);
         this.mark = dot;
         handleHighlight();
         adjustVisibility(this);

? include/gnu_java_net_PlainDatagramSocketImpl.h
? include/gnu_java_net_PlainSocketImpl.h
Index: javax/swing/text/DefaultCaret.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/DefaultCaret.java,v
retrieving revision 1.27
diff -u -r1.27 DefaultCaret.java
--- javax/swing/text/DefaultCaret.java	5 Jan 2006 20:15:34 -0000	1.27
+++ javax/swing/text/DefaultCaret.java	5 Jan 2006 23:50:04 -0000
@@ -833,7 +833,7 @@
         Document doc = textComponent.getDocument();
         if (doc != null)
           this.dot = Math.min(dot, doc.getLength());
-        this.dot = Math.max(dot, 0);
+        this.dot = Math.max(this.dot, 0);
         this.mark = dot;
         handleHighlight();
         adjustVisibility(this);
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to