MessageFormat.java (parse): When parsing strings, check for an empty pattern trailer.
2005-06-08 Ziga Mahkovec <ziga.mahkovec@klika.si> * java/text/MessageFormat.java (parse): When parsing strings, check for an empty pattern trailer. From-SVN: r100761
This commit is contained in:
parent
cf22360307
commit
a6cddf6e80
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-06-08 Ziga Mahkovec <ziga.mahkovec@klika.si>
|
||||||
|
|
||||||
|
* java/text/MessageFormat.java (parse): When parsing strings, check
|
||||||
|
for an empty pattern trailer.
|
||||||
|
|
||||||
2005-06-06 Keith Seitz <keiths@redhat.com>
|
2005-06-06 Keith Seitz <keiths@redhat.com>
|
||||||
|
|
||||||
* gnu/classpath/jdwp/util/Signature.java: New file.
|
* gnu/classpath/jdwp/util/Signature.java: New file.
|
||||||
|
|
|
@ -658,7 +658,11 @@ public class MessageFormat extends Format
|
||||||
{
|
{
|
||||||
// We have a String format. This can lose in a number
|
// We have a String format. This can lose in a number
|
||||||
// of ways, but we give it a shot.
|
// 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)
|
if (next_index == -1)
|
||||||
{
|
{
|
||||||
pos.setErrorIndex(index);
|
pos.setErrorIndex(index);
|
||||||
|
|
Loading…
Add table
Reference in a new issue