diff options
author | ziga <ziga@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-08 15:46:08 +0000 |
---|---|---|
committer | ziga <ziga@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-08 15:46:08 +0000 |
commit | 29890538394d9a6c63346a404dd90c4f5f0256ed (patch) | |
tree | de06061bbe96bf2f6161d3324053a1ea68548502 /libjava | |
parent | bafbe9351f02e858b62dc506b9c585ece370662c (diff) | |
download | gcc-29890538394d9a6c63346a404dd90c4f5f0256ed.tar.gz |
2005-06-08 Ziga Mahkovec <ziga.mahkovec@klika.si>
* java/text/MessageFormat.java (parse): When parsing strings, check
for an empty pattern trailer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100761 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/text/MessageFormat.java | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index a5ad66c5270..043a51717f2 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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> * gnu/classpath/jdwp/util/Signature.java: New file. diff --git a/libjava/java/text/MessageFormat.java b/libjava/java/text/MessageFormat.java index 4a24afd1f44..8d53ec21ec1 100644 --- a/libjava/java/text/MessageFormat.java +++ b/libjava/java/text/MessageFormat.java @@ -658,7 +658,11 @@ public class MessageFormat extends Format { // 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); |