4 Replies Latest reply on Aug 19, 2008 7:07 PM by 795426

    failure to convert infinite double to BigDecimal

      I need to convert double to BigDecimal. But one of the double values is infinite and is not converted into the BigDecimal.

      I am getting this error.

      java.lang.NumberFormatException: Infinite or NaN.

      This is how I am converting it.

      private BigDecimal convert(Double object) {
      return new BigDecimal(object);

      Does anybody know how to do this?