code: public static BigDecimal createBigDecimal(final String str) {
          if (str == null) {
              return null;
          }
          // handle JDK1.3.1 bug where "" throws IndexOutOfBoundsException
          if (StringUtils.isBlank(str)) {
              throw new NumberFormatException("A blank string is not a valid number");
          }
          if (str.trim().startsWith("--")) {
              // this is protection for poorness in java.lang.BigDecimal.
              // it accepts this as a legal value, but it does not appear
              // to be in specification of class. OS X Java parses it to
              // a wrong value.
              throw new NumberFormatException(str + " is not a valid number.");
          }
          return new BigDecimal(str);
      }
docs: <p>Convert a <code>String</code> to a <code>BigDecimal</code>.</p>
  
  <p>Returns <code>null</code> if the string is <code>null</code>.</p>
  
  @param str  a <code>String</code> to convert, may be null
  @return converted <code>BigDecimal</code> (or null if the input is null)
  @throws NumberFormatException if the value cannot be converted