--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/Font.java Thu May 27 12:49:31 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/Font.java Fri Jun 11 13:33:44 2010 +0300
@@ -459,7 +459,14 @@
*/
public int charsWidth(char[] c, int offset, int length)
{
- return stringWidth(new String(c, offset, length));
+ try
+ {
+ final String string = new String(c, offset, length);
+ return stringWidth(string);
+ }catch (StringIndexOutOfBoundsException ex)
+ {
+ throw new ArrayIndexOutOfBoundsException();
+ }
}
/**