Adding appendHex method to StringBuilder
温绍锦(高铁)
shaojin.wensj at alibaba-inc.com
Sat Sep 30 12:06:33 UTC 2023
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20230930/c8cbdceb/attachment.htm>
More information about the core-libs-dev
mailing list