Here two final variants:
- one with BigDecimals and improved range spliut logic (I like this patch more!)
- one with Yoniks fix
Both patches contain the same tests that pass. I converted Yoniks test and added to TestNumericUtils, which tests more intensive, if the spliutted range is correct: I ensures that all sub range bounds are inside the whole range and that there are no holes in the range. It also checks (important for yoniks fix) that one example range is splitted into the correct sub-ranges. I removed inverse ranges from yoniks patch, as they can never break (NRQ and also splitRange exits early if lower > upper). Also to enable the tests for ranges without holes, the bitset size cannot grow unlimited, so the maximum length of the range is limited to 8192*1024.
I still did not use autoboxing and varargs in the TestNumericUtils, as now this patch should apply easy to 2.9 (with minor changes), so the initial merging works. After committing this to all branches, i would update 3.x and trunk to use varargs and autoboxing, which makes the test more readable.
Without NumericUtils fix, the new testcases both fail.
I just want to know: Which patch do you prefer? Else this is ready to commit with the cleanup work in 3.x and trunk later.