java.lang.Object
org.jruby.util.SafeDoubleParser
Deprecated.
A safer way to parse double values
Prevents brute force attacks using the famous Java bug.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static final doubledecimalValue(Number number) Deprecated.protected static final doubledecimalValue(BigDecimal bigDecimal) Deprecated.protected static final DoubleDeprecated.static doubledoubleValue(Number number) Deprecated.static doubledoubleValue(BigDecimal bigDecimal) Deprecated.static DoubleDeprecated.static DoubleDeprecated.
-
Constructor Details
-
SafeDoubleParser
public SafeDoubleParser()Deprecated.
-
-
Method Details
-
valueOf
Deprecated.Safe way of parsing a Double value from a String- Parameters:
s- The input String- Returns:
- the Double value
-
parseDouble
Deprecated.Safe way of parsing a Double value from a String- Parameters:
s- The input String- Returns:
- the Double value
-
doubleValue
Deprecated.Safe way of getting the double value
prevents BigDecimal from calling Double.parseDouble()- Parameters:
number-- Returns:
- the double value
-
doubleValue
Deprecated.Safe way of getting the double value
Prevents BigDecimal from calling Double.parseDouble()- Parameters:
bigDecimal-- Returns:
- the double value
-
decimalValueOf
Deprecated.Safe parsing of a String into a Double- Parameters:
s- The input String, can be null- Returns:
- The Double value
-
decimalValue
Deprecated.Safe way of getting the double value
prevents BigDecimal from calling Double.parseDouble()- Parameters:
number-- Returns:
- the double value
-
decimalValue
Deprecated.Safe way of getting the double value
Prevents BigDecimal from calling Double.parseDouble()- Parameters:
bigDecimal-- Returns:
- the double value
-