Hi Roman, On Fri, 2005-11-04 at 15:42 +0100, Mark Wielaard wrote: > On Fri, 2005-11-04 at 11:33 +0000, Roman Kennke wrote: > > This adds the getMinimumSize() method to the BasicTextUI and replaces a > > 'should never happen' comment with an assert statement. > > [...] > > catch (BadLocationException e) > > { > > - // This should never happen. > > - text = ""; > > + assert false : e.toString(); > > + text = ""; > > } > > Please chain the exception before throwing the assert.
I fixed this for you as follows: 2005-11-11 Mark Wielaard <[EMAIL PROTECTED]> * javax/swing/text/FieldView.java (getPreferredSpan): Chain BadLocationException when throwing assertion. Committed, Mark diff -u -r1.9 FieldView.java --- javax/swing/text/FieldView.java 4 Nov 2005 11:32:05 -0000 1.9 +++ javax/swing/text/FieldView.java 11 Nov 2005 12:46:13 -0000 @@ -130,8 +130,10 @@ } catch (BadLocationException e) { - assert false : e.toString(); - text = ""; + // Should never happen + AssertionError ae = new AssertionError(); + ae.initCause(e); + throw ae; } return fm.stringWidth(text);
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches