[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mauve status
From: |
Mark Wielaard |
Subject: |
Re: Mauve status |
Date: |
Fri, 02 Sep 2005 13:59:59 +0200 |
Hi,
On Fri, 2005-09-02 at 00:20 +0200, Mark Wielaard wrote:
> Running the Mauve testsuite (CVS) in preparation of 0.18:
>
> With the following regressions:
>
> +FAIL: gnu.testlet.javax.swing.text.AbstractDocument.AbstractDocumentTest:
> uncaught exception at "testCreateLeafElement" number 1:
> java.lang.NullPointerException
This one can be trivially fixed by the attached patch that allows a null
parent for createLeafElement(). But I haven't actually studied if this
is the correct behavior.
Roman, could you take a look at this?
Thanks,
Mark
Index: javax/swing/text/AbstractDocument.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/AbstractDocument.java,v
retrieving revision 1.26
diff -u -r1.26 AbstractDocument.java
--- javax/swing/text/AbstractDocument.java 29 Aug 2005 17:02:02 -0000
1.26
+++ javax/swing/text/AbstractDocument.java 2 Sep 2005 11:59:10 -0000
@@ -1864,16 +1864,30 @@
int end)
{
super(parent, attributes);
- try
{
- startPos = parent.getDocument().createPosition(start);
- endPos = parent.getDocument().createPosition(end);
- }
- catch (BadLocationException ex)
- {
- throw new AssertionError("BadLocationException must not be thrown "
- + "here. start=" + start + ", end=" + end
- + ", length=" + getLength());
+ try
+ {
+ if (parent != null)
+ {
+ startPos = parent.getDocument().createPosition(start);
+ endPos = parent.getDocument().createPosition(end);
+ }
+ else
+ {
+ startPos = createPosition(start);
+ endPos = createPosition(end);
+ }
+ }
+ catch (BadLocationException ex)
+ {
+ AssertionError as;
+ as = new AssertionError("BadLocationException thrown "
+ + "here. start=" + start
+ + ", end=" + end
+ + ", length=" + getLength());
+ as.initCause(ex);
+ throw as;
+ }
}
}
signature.asc
Description: This is a digitally signed message part