Hi, BeanShell is throwing some nasty AssertionErrors in DefaultCaret. I am not investigating this further or fixing it since BeanShell wasn't really working that well before with 0.19. Although we seem pretty close now (try the BeanShell Class Browser!). This is just to give us better exceptions if people want to report/debug this issue:
2005-01-13 Mark Wielaard <[EMAIL PROTECTED]>
* javax/swing/text/DefaultCaret.java: Chain all AssertionErrors.
Committed,
Mark
Index: javax/swing/text/DefaultCaret.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/DefaultCaret.java,v
retrieving revision 1.28
diff -u -r1.28 DefaultCaret.java
--- javax/swing/text/DefaultCaret.java 5 Jan 2006 23:52:14 -0000 1.28
+++ javax/swing/text/DefaultCaret.java 13 Jan 2006 09:55:27 -0000
@@ -1,5 +1,5 @@
/* DefaultCaret.java --
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -668,8 +668,10 @@
}
catch (BadLocationException e)
{
- assert false : "Unexpected bad caret location: " + dot;
- return;
+ AssertionError ae;
+ ae = new AssertionError("Unexpected bad caret location: " + dot);
+ ae.initCause(e);
+ throw ae;
}
if (rect == null)
@@ -863,13 +865,17 @@
visible = true;
Rectangle area = null;
+ int dot = getDot();
try
{
- area = getComponent().modelToView(getDot());
+ area = getComponent().modelToView(dot);
}
- catch (BadLocationException ex)
+ catch (BadLocationException e)
{
- assert false : "Unexpected bad caret location: " + getDot();
+ AssertionError ae;
+ ae = new AssertionError("Unexpected bad caret location: " + dot);
+ ae.initCause(e);
+ throw ae;
}
if (area != null)
damage(area);
@@ -902,13 +908,17 @@
visible = v;
updateTimerStatus();
Rectangle area = null;
+ int dot = getDot();
try
{
- area = getComponent().modelToView(getDot());
+ area = getComponent().modelToView(dot);
}
- catch (BadLocationException ex)
+ catch (BadLocationException e)
{
- assert false: "Unexpected bad caret location: " + getDot();
+ AssertionError ae;
+ ae = new AssertionError("Unexpected bad caret location: " + dot);
+ ae.initCause(e);
+ throw ae;
}
if (area != null)
damage(area);
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/classpath-patches
