Skip to content

Update toHex - #171

Open
da-Kai wants to merge 3 commits into
steveohara:masterfrom
da-Kai:feature/updateToHex
Open

da-Kai wants to merge 3 commits into
steveohara:masterfrom
da-Kai:feature/updateToHex

Conversation

@da-Kai

@da-Kai da-Kai commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Improves the toHex-methods in in ModbusUtil

  • Rename the byte[] toHex(int) method to byte[] toHexBytes(int), to clarify its not an overload of the other toHex methods
  • Introduced a static HEX_DIGITS array for efficient and consistent hex digit lookup.
  • Add Unit Tests

da-Kai and others added 3 commits September 21, 2026 20:27
- reurning an empty string for null byte arrays
- rename the integer encoder to `toHexBytes`
- using `StandardCharsets.US_ASCII`
- Add Unit-tests for `toHex`-methods

This branch has not been deployed

No deployments
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