Skip to content

Conversation

@Akshat-coder2106
Copy link

Summary

This PR addresses LANG-1725 by updating the Conversion class to throw IllegalArgumentException instead of IndexOutOfBoundsException when a provided index is out of bounds.

Changes

  • Conversion.java: Updated binaryBeMsb0ToHexDigit(boolean[], int) to throw IllegalArgumentException. The original IndexOutOfBoundsException is now wrapped as the cause to preserve the technical stack trace.
  • ConversionTest.java: Updated the test binaryBeMsb0ToHexDigitPosOutsideArray to expect IllegalArgumentException.
  • Javadoc: Updated method documentation to reflect the change in exception type.

Quality Check

  • Zero Formatting Noise: I have disabled "Format on Save" and "Optimize Imports" to ensure the diff only contains the necessary logic changes. No unrelated lines or white-spaces have been modified.
  • Trailing Newlines: Verified that all modified files end with a single empty line.
  • Tests: Ran mvn test -Dtest=ConversionTest and achieved BUILD SUCCESS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant