PatchSet 4392 Date: 2004/02/02 18:25:35 Author: dalibor Branch: HEAD Tag: (none) Log: Resynced with GNU Classpath
2004-02-02 Dalibor Topic <[EMAIL PROTECTED]> Resynced with GNU Classpath. 2004-01-14 Michael Koch <[EMAIL PROTECTED]> * java/text/MessageFormat.java: Added descriptions to exceptions. This fixes PR libgcj/2429. Members: ChangeLog:1.1976->1.1977 libraries/javalib/java/text/MessageFormat.java:1.22->1.23 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.1976 kaffe/ChangeLog:1.1977 --- kaffe/ChangeLog:1.1976 Mon Feb 2 18:13:52 2004 +++ kaffe/ChangeLog Mon Feb 2 18:25:35 2004 @@ -2,6 +2,16 @@ Resynced with GNU Classpath. + 2004-01-14 Michael Koch <[EMAIL PROTECTED]> + + * java/text/MessageFormat.java: + Added descriptions to exceptions. + This fixes PR libgcj/2429. + +2004-02-02 Dalibor Topic <[EMAIL PROTECTED]> + + Resynced with GNU Classpath. + 2004-01-25 Michael Koch <[EMAIL PROTECTED]> * java/net/URLConnection.java Index: kaffe/libraries/javalib/java/text/MessageFormat.java diff -u kaffe/libraries/javalib/java/text/MessageFormat.java:1.22 kaffe/libraries/javalib/java/text/MessageFormat.java:1.23 --- kaffe/libraries/javalib/java/text/MessageFormat.java:1.22 Sun Jan 11 19:52:23 2004 +++ kaffe/libraries/javalib/java/text/MessageFormat.java Mon Feb 2 18:25:37 2004 @@ -209,7 +209,7 @@ else if (c == '{') break; else if (c == '}') - throw new IllegalArgumentException (); + throw new IllegalArgumentException("Found '}' without '{'"); else buffer.append(c); } @@ -284,7 +284,7 @@ } catch (NumberFormatException nfx) { - throw new IllegalArgumentException (); + throw new IllegalArgumentException("Failed to parse integer string"); } // Extract the element format. @@ -303,7 +303,7 @@ // Advance past the last terminator. if (index >= max || pat.charAt(index) != '}') - throw new IllegalArgumentException (); + throw new IllegalArgumentException("Missing '}' at end of message format"); ++index; // Now fetch trailing string. @@ -413,7 +413,8 @@ for (int i = 0; i < elements.length; ++i) { if (elements[i].argNumber >= arguments.length) - throw new IllegalArgumentException (); + throw new IllegalArgumentException("Not enough arguments given"); + Object thisArg = arguments[elements[i].argNumber]; AttributedCharacterIterator iterator = null; @@ -428,7 +429,8 @@ { if (elements[i].formatClass != null && ! elements[i].formatClass.isInstance(thisArg)) - throw new IllegalArgumentException (); + throw new IllegalArgumentException("Wrong format class"); + formatter = elements[i].format; } else if (thisArg instanceof Number) @@ -705,7 +707,8 @@ public void setFormats (Format[] newFormats) { if (newFormats.length < elements.length) - throw new IllegalArgumentException (); + throw new IllegalArgumentException("Not enough format objects"); + int len = Math.min(newFormats.length, elements.length); for (int i = 0; i < len; ++i) elements[i].setFormat = newFormats[i]; _______________________________________________ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe