czpilar commented on PR #96:
URL: https://github.com/apache/poi-xmlbeans/pull/96#issuecomment-5431861306

   The negative-scale case reproduces exactly as described - I added the three 
cases as a test against the operand-swap version first, and 1E+20 failed with 
the same "Value can't be converted to long". So the swap only narrowed the 
window rather than closing it.
   
   Switched to signum(). Agreed it is the right level to fix this at: the 
branch is a zero test, signum() states that directly, and it takes MathUtil off 
the serialization path. Also dropped the && evaluation-order comment, which no 
longer applies.
   
   Tests now cover positive scale, negative scale and zero with both signs of 
scale. XsTypeConverterTest (32), TestMathUtil (14), SchemaTypesTests and 
NumeralsTests all pass.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to