garydgregory commented on PR #459: URL: https://github.com/apache/commons-codec/pull/459#issuecomment-6993767265
@Palendromas1 The coverage is useful, but this PR needs a few improvements before merging. See commit afaeeac40291476fd0d055ac71e7951002a7cc08. In this PR: - `%2` overlaps `testDecodeInvalidEncodedResultDecoding`, while leaving that existing test’s weakness intact: its `try/catch` passes if decoding throws nothing. - `%GG` does not independently verify first-digit validation. If that validation breaks, the second `G` still produces the expected exception. I confirmed this with a temporary mutation. - The repeated malformed-input assertions are better expressed as parameterized tests, which also report each failing input separately. My commit afaeeac40291476fd0d055ac71e7951002a7cc08 replaces the existing truncation test with parameterized cases, preserving its valid-prefix scenario and exception-cause assertion. A separate parameterized test uses `%G2` and `%2G` to verify each hex digit independently. It also retains the Javadoc clarification and the distinct RFC1522 empty-content test, with a comment explaining that accepting empty content preserves existing permissive behavior. This provides stronger regression protection without accumulating overlapping test methods. Temporary mutation checks confirmed that the revised tests detect broken validation of either digit, swallowed truncation errors, and lost exception causes. Closing; you are credited in `changes.xml`. -- 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]
