+2004-10-25 Tom Tromey <tromey@redhat.com>
+
+ * gnu/java/text/WordBreakIterator.java (WordBreakIterator): Don't
+ initialize `iter'.
+ * gnu/java/text/SentenceBreakIterator.java
+ (SentenceBreakIterator): Don't initialize `iter'.
+ * gnu/java/text/LineBreakIterator.java (LineBreakIterator): Don't
+ initialize `iter'.
+ * gnu/java/text/CharacterBreakIterator.java
+ (CharacterBreakIterator): Don't initialize `iter'.
+ * gnu/java/text/BaseBreakIterator.java (BaseBreakIterator): New
+ constructor.
+ * java/text/BreakIterator.java: Updated documentation.
+
2004-10-25 Eric Botcazou <ebotcazou@libertysurf.fr>
PR other/18138
/* BaseBreakIterator.java -- Base class for default BreakIterators
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
import java.text.BreakIterator;
import java.text.CharacterIterator;
+import java.text.StringCharacterIterator;
/**
* @author Tom Tromey <tromey@cygnus.com>
public abstract class BaseBreakIterator extends BreakIterator
{
+ public BaseBreakIterator ()
+ {
+ // It isn't documented, but break iterators are created in a
+ // working state; their methods won't throw exceptions before
+ // setText().
+ iter = new StringCharacterIterator("");
+ }
+
public int current ()
{
return iter.getIndex();
/* CharacterBreakIterator.java - Default character BreakIterator.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
public CharacterBreakIterator ()
{
- iter = null; // FIXME?
}
private CharacterBreakIterator (CharacterBreakIterator other)
/* LineBreakIterator.java - Default word BreakIterator.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
public LineBreakIterator ()
{
- iter = null;
}
private LineBreakIterator (LineBreakIterator other)
/* SentenceBreakIterator.java - Default sentence BreakIterator.
- Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
public SentenceBreakIterator ()
{
- iter = null;
}
private SentenceBreakIterator (SentenceBreakIterator other)
/* WordBreakIterator.java - Default word BreakIterator.
- Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
public WordBreakIterator ()
{
- iter = null;
}
private WordBreakIterator (WordBreakIterator other)
/* BreakIterator.java -- Breaks text into elements
- Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2001, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* type is created by calling one of the static factory methods, not
* by directly calling a constructor.
*
+ * The standard iterators created by the factory methods in this
+ * class will be valid upon creation. That is, their methods will
+ * not cause exceptions if called before you call setText().
+ *
* @author Tom Tromey <tromey@cygnus.com>
* @author Aaron M. Renn (arenn@urbanophile.com)
* @date March 19, 1999