[kaffe] CVS kaffe (robilad): resynced with gnu classpath: messageformat fix

Kaffe CVS cvs-commits at kaffe.org
Sat Jul 2 19:19:36 PDT 2005


PatchSet 6682 
Date: 2005/07/03 02:14:03
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
resynced with gnu classpath: messageformat fix

2005-07-03  Dalibor Topic  <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2005-06-12  Ziga Mahkovec  <ziga.mahkovec at klika.si>

        * java/text/MessageFormat.java (parse): When parsing strings, check
        for an empty pattern trailer.

Members: 
	ChangeLog:1.4207->1.4208 
	libraries/javalib/java/text/MessageFormat.java:1.37->1.38 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4207 kaffe/ChangeLog:1.4208
--- kaffe/ChangeLog:1.4207	Sun Jul  3 02:07:36 2005
+++ kaffe/ChangeLog	Sun Jul  3 02:14:03 2005
@@ -4,6 +4,15 @@
 
 	2005-06-12  Ziga Mahkovec  <ziga.mahkovec at klika.si>
 
+        * java/text/MessageFormat.java (parse): When parsing strings, check
+        for an empty pattern trailer.
+
+2005-07-03  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
+	2005-06-12  Ziga Mahkovec  <ziga.mahkovec at klika.si>
+
         PR libgcj/20435:
         * gnu/regexp/RESyntax.java (RE_POSSESSIVE_OPS): New field.
         (static): Add possessive matching to JAVA_1_4 syntax.
Index: kaffe/libraries/javalib/java/text/MessageFormat.java
diff -u kaffe/libraries/javalib/java/text/MessageFormat.java:1.37 kaffe/libraries/javalib/java/text/MessageFormat.java:1.38
--- kaffe/libraries/javalib/java/text/MessageFormat.java:1.37	Thu May 26 12:00:05 2005
+++ kaffe/libraries/javalib/java/text/MessageFormat.java	Sun Jul  3 02:14:05 2005
@@ -658,7 +658,11 @@
 	  {
 	    // We have a String format.  This can lose in a number
 	    // of ways, but we give it a shot.
-	    int next_index = sourceStr.indexOf(elements[i].trailer, index);
+	    int next_index;
+	    if (elements[i].trailer.length() > 0)
+	      next_index = sourceStr.indexOf(elements[i].trailer, index);
+	    else
+	      next_index = sourceStr.length();
 	    if (next_index == -1)
 	      {
 		pos.setErrorIndex(index);




More information about the kaffe mailing list