There are many combinations of `append(Integer.toHexString(i))` and 
`append(Long.toHexString(i))` in the JDK code. I request to add method 
`appendHex(int)` and `appendHex(int)` to StringBuilder and StringBuffer. This 
can reduce duplicate code within the JDK and will also be useful to users.
I submitted a PR ( https://github.com/openjdk/jdk/pull/15998 
<https://github.com/openjdk/jdk/pull/15998 > ), including the code and tests 
for the new method. I also replaced the code that uses the append + toHexString 
combination inside the JDK with appendHex.
Please review and don't hesitate to critique my approach and patch.

Reply via email to