calrissian / mango

Common utilities for rapid application development
Apache License 2.0
17 stars 7 forks source link

Fix the Zero encoding for big decimal so it does not appear greater than values less than 1. #204

Closed eawagner closed 8 years ago

eawagner commented 8 years ago

See ticket #203 for details on the bug and why we need additional special handling for zero.

This is a breaking change to the previous encoding. A value stored as new BigDecimal("0.00000") previously will be equivalent to new BigDecimal("0E+2147483643") when decoded with this change. These values are equivalent values for 0, however are not exactly equal because the scale is now different.