WordBreakIterator.java (WordBreakIterator): Don't initialize `iter'.
* 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. From-SVN: r89539
This commit is contained in:
parent
5cfffc4e16
commit
6fc058da98
@ -1,3 +1,17 @@
|
||||
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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -40,6 +40,7 @@ package gnu.java.text;
|
||||
|
||||
import java.text.BreakIterator;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.StringCharacterIterator;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
@ -48,6 +49,14 @@ import java.text.CharacterIterator;
|
||||
|
||||
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();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -69,7 +69,6 @@ public class CharacterBreakIterator extends BaseBreakIterator
|
||||
|
||||
public CharacterBreakIterator ()
|
||||
{
|
||||
iter = null; // FIXME?
|
||||
}
|
||||
|
||||
private CharacterBreakIterator (CharacterBreakIterator other)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -55,7 +55,6 @@ public class LineBreakIterator extends BaseBreakIterator
|
||||
|
||||
public LineBreakIterator ()
|
||||
{
|
||||
iter = null;
|
||||
}
|
||||
|
||||
private LineBreakIterator (LineBreakIterator other)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -55,7 +55,6 @@ public class SentenceBreakIterator extends BaseBreakIterator
|
||||
|
||||
public SentenceBreakIterator ()
|
||||
{
|
||||
iter = null;
|
||||
}
|
||||
|
||||
private SentenceBreakIterator (SentenceBreakIterator other)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -55,7 +55,6 @@ public class WordBreakIterator extends BaseBreakIterator
|
||||
|
||||
public WordBreakIterator ()
|
||||
{
|
||||
iter = null;
|
||||
}
|
||||
|
||||
private WordBreakIterator (WordBreakIterator other)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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.
|
||||
|
||||
@ -49,6 +49,10 @@ import java.util.ResourceBundle;
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user