[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: BreakIterator fixes
Kaffe CVS
cvs-commits at kaffe.org
Mon Oct 25 14:02:40 PDT 2004
PatchSet 5367
Date: 2004/10/25 19:54:25
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: BreakIterator fixes
2004-10-25 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/gnu/java/text/BaseBreakIterator.java,
libraries/javalib/gnu/java/text/CharacterBreakIterator.java,
libraries/javalib/gnu/java/text/LineBreakIterator.java,
libraries/javalib/gnu/java/text/SentenceBreakIterator.java,
libraries/javalib/gnu/java/text/WordBreakIterator.java,
libraries/javalib/java/text/BreakIterator.java:
Resynced with GNU Classpath.
2004-10-25 Tom Tromey <tromey at 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.
Members:
ChangeLog:1.2919->1.2920
libraries/javalib/gnu/java/text/BaseBreakIterator.java:1.1->1.2
libraries/javalib/gnu/java/text/CharacterBreakIterator.java:1.3->1.4
libraries/javalib/gnu/java/text/LineBreakIterator.java:1.2->1.3
libraries/javalib/gnu/java/text/SentenceBreakIterator.java:1.2->1.3
libraries/javalib/gnu/java/text/WordBreakIterator.java:1.2->1.3
libraries/javalib/java/text/BreakIterator.java:1.11->1.12
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2919 kaffe/ChangeLog:1.2920
--- kaffe/ChangeLog:1.2919 Mon Oct 25 19:30:44 2004
+++ kaffe/ChangeLog Mon Oct 25 19:54:25 2004
@@ -1,5 +1,29 @@
2004-10-25 Dalibor Topic <robilad at kaffe.org>
+ * libraries/javalib/gnu/java/text/BaseBreakIterator.java,
+ libraries/javalib/gnu/java/text/CharacterBreakIterator.java,
+ libraries/javalib/gnu/java/text/LineBreakIterator.java,
+ libraries/javalib/gnu/java/text/SentenceBreakIterator.java,
+ libraries/javalib/gnu/java/text/WordBreakIterator.java,
+ libraries/javalib/java/text/BreakIterator.java:
+ Resynced with GNU Classpath.
+
+ 2004-10-25 Tom Tromey <tromey at 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 Dalibor Topic <robilad at kaffe.org>
+
* libraries/javalib/javax/swing/JMenuBar.java,
libraries/javalib/javax/swing/tree/DefaultTreeSelectionModel.java:
Resynced with GNU Classpath.
Index: kaffe/libraries/javalib/gnu/java/text/BaseBreakIterator.java
diff -u kaffe/libraries/javalib/gnu/java/text/BaseBreakIterator.java:1.1 kaffe/libraries/javalib/gnu/java/text/BaseBreakIterator.java:1.2
--- kaffe/libraries/javalib/gnu/java/text/BaseBreakIterator.java:1.1 Sat Aug 16 13:01:07 2003
+++ kaffe/libraries/javalib/gnu/java/text/BaseBreakIterator.java Mon Oct 25 19:54:28 2004
@@ -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 @@
import java.text.BreakIterator;
import java.text.CharacterIterator;
+import java.text.StringCharacterIterator;
/**
* @author Tom Tromey <tromey at cygnus.com>
@@ -48,6 +49,14 @@
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();
Index: kaffe/libraries/javalib/gnu/java/text/CharacterBreakIterator.java
diff -u kaffe/libraries/javalib/gnu/java/text/CharacterBreakIterator.java:1.3 kaffe/libraries/javalib/gnu/java/text/CharacterBreakIterator.java:1.4
--- kaffe/libraries/javalib/gnu/java/text/CharacterBreakIterator.java:1.3 Tue May 18 16:13:31 2004
+++ kaffe/libraries/javalib/gnu/java/text/CharacterBreakIterator.java Mon Oct 25 19:54:28 2004
@@ -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 CharacterBreakIterator ()
{
- iter = null; // FIXME?
}
private CharacterBreakIterator (CharacterBreakIterator other)
Index: kaffe/libraries/javalib/gnu/java/text/LineBreakIterator.java
diff -u kaffe/libraries/javalib/gnu/java/text/LineBreakIterator.java:1.2 kaffe/libraries/javalib/gnu/java/text/LineBreakIterator.java:1.3
--- kaffe/libraries/javalib/gnu/java/text/LineBreakIterator.java:1.2 Mon Mar 22 11:24:27 2004
+++ kaffe/libraries/javalib/gnu/java/text/LineBreakIterator.java Mon Oct 25 19:54:28 2004
@@ -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 LineBreakIterator ()
{
- iter = null;
}
private LineBreakIterator (LineBreakIterator other)
Index: kaffe/libraries/javalib/gnu/java/text/SentenceBreakIterator.java
diff -u kaffe/libraries/javalib/gnu/java/text/SentenceBreakIterator.java:1.2 kaffe/libraries/javalib/gnu/java/text/SentenceBreakIterator.java:1.3
--- kaffe/libraries/javalib/gnu/java/text/SentenceBreakIterator.java:1.2 Mon Mar 22 11:24:27 2004
+++ kaffe/libraries/javalib/gnu/java/text/SentenceBreakIterator.java Mon Oct 25 19:54:28 2004
@@ -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 SentenceBreakIterator ()
{
- iter = null;
}
private SentenceBreakIterator (SentenceBreakIterator other)
Index: kaffe/libraries/javalib/gnu/java/text/WordBreakIterator.java
diff -u kaffe/libraries/javalib/gnu/java/text/WordBreakIterator.java:1.2 kaffe/libraries/javalib/gnu/java/text/WordBreakIterator.java:1.3
--- kaffe/libraries/javalib/gnu/java/text/WordBreakIterator.java:1.2 Mon Mar 22 11:24:27 2004
+++ kaffe/libraries/javalib/gnu/java/text/WordBreakIterator.java Mon Oct 25 19:54:28 2004
@@ -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 WordBreakIterator ()
{
- iter = null;
}
private WordBreakIterator (WordBreakIterator other)
Index: kaffe/libraries/javalib/java/text/BreakIterator.java
diff -u kaffe/libraries/javalib/java/text/BreakIterator.java:1.11 kaffe/libraries/javalib/java/text/BreakIterator.java:1.12
--- kaffe/libraries/javalib/java/text/BreakIterator.java:1.11 Wed Jun 16 20:28:32 2004
+++ kaffe/libraries/javalib/java/text/BreakIterator.java Mon Oct 25 19:54:29 2004
@@ -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.
@@ -48,6 +48,10 @@
* a time. An instance of this class configured for the desired iteration
* 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 at cygnus.com>
* @author Aaron M. Renn (arenn at urbanophile.com)
More information about the kaffe
mailing list