code: public static Numeric create(Number number) {
      if (number == null) {
        throw new NullPointerException();
      }
      if (number instanceof Double && ((Double)number).isInfinite() || number instanceof Float && ((Float)number).isInfinite()) {
        throw new NumberFormatException("Infinite numbers are not valid numerics");
      }
      return new Numeric(number);
    }
docs: Return a {@code Numeric} instance for the given {@code number}.
  <p/>
  Null values or infinite {@code Double} or {@code Float} are rejected.
  
  @param number the number
  @return the {@code Numeric} value
  @throws NumberFormatException when the number is infinite