garydgregory commented on PR #1842:
URL: https://github.com/apache/commons-lang/pull/1842#issuecomment-6441958807

   @alhudz 
   
   PR merged but, in the future, please write better tests.
   
   The fix is valid, but the original regression test left the new 
`MILLISECOND` branch untested: its input used 245 milliseconds, which the 
existing LANG-59 arithmetic clears before reaching the new switch. Reverting 
only that branch still allowed the original test to pass.
   
   I added coverage in 
[a5d6c5ed](https://github.com/apache/commons-lang/commit/a5d6c5ed8847b2b14dacf062b646f94d6cc61a10):
   
   - Millisecond values `245`, `499`, `500`, and `999`, with explicit 
second-rounding assertions.
   - Explicit London-zone `Calendar` tests with UTC as the default, including 
checks for time zone preservation and input immutability.
   - Corrected test Javadoc: the goal is to prevent unintended overlap shifts, 
since crossing the transition can legitimately change the offset.
   
   Mutation checks confirmed that reverting any of the three arithmetic 
branches causes the expanded tests to fail. The full default Maven build also 
passed.


-- 
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]

Reply via email to