Index: java/text/MessageFormat.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/text/MessageFormat.java,v retrieving revision 1.19 diff -u -p -r1.19 MessageFormat.java --- java/text/MessageFormat.java 24 May 2005 18:07:38 -0000 1.19 +++ java/text/MessageFormat.java 6 Jun 2005 20:44:35 -0000 @@ -658,7 +658,11 @@ public class MessageFormat extends Forma { // 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 = -1; + 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);