Converts decimal text to BigDecimal, keeping the precision written

All 4 scenarios hold

Scale is the number of digits after the decimal point — negative when scientific notation places the value's precision above the point.

expected outcome broken scenario
ScenarioInput valueParameter type?BigDecimal as plain number?BigDecimal scale?
Plain decimal3.14159java.math.BigDecimal3.141595
Leading zero0.1java.math.BigDecimal0.11
Scientific notation1.23e4java.math.BigDecimal12300-2
No decimal point123java.math.BigDecimal1230