FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
It assumes that there will always be an exponent following an E. If there isn't, this throws an AIOOBE:
// exponent expected
if ((c != 'e') && (c != 'E'))
throw new NumberFormatException();
offset++;
c = in[offset]; <---- exception
Parsing this invalid string should presumably throw a NumberFormatException, instead.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
new BigDecimal( " 1.234E " );
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
It assumes that there will always be an exponent following an E. If there isn't, this throws an AIOOBE:
// exponent expected
if ((c != 'e') && (c != 'E'))
throw new NumberFormatException();
offset++;
c = in[offset]; <---- exception
Parsing this invalid string should presumably throw a NumberFormatException, instead.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
new BigDecimal( " 1.234E " );
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-7082971 More performance tuning of BigDecimal and other java.math classes
-
- Closed
-