I got an exception report from a client. In this report StringBuilder.append( double ) throws an ArrayIndexOutOfBoundsException.

There is no thread issue involved, because that code simply looks as follows:

Code :

StringBuilder sb = new StringBuilder( "" );
sb.append( degrees ); // This is the line that throws an exception (degrees is of type double)

The stack trace of the exception is:

Code :

at java.lang.RealToString.longDigitGenerator(RealToString.java:274)
at java.lang.RealToString.convertDouble(RealToString.java:111)
at java.lang.RealToString.appendDouble(RealToString.java:63)
at java.lang.StringBuilder.append(StringBuilder.java:185)
at my code